Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ module Actions
# 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 [String] :merge_type The method to be used when merging mapping_additions existing mappings. Mappings can be merged in the way mapping changes are merged into an existing index, or in
# the way mapping changes are merged into existing templates. Some changes are allowed to templates that are not allowed to indices. For example,
# a field cannot be changed to an incompatible type in an index, but can in a template. Server default: index.
# @option arguments [String] :merge_type The mapping merge type if mapping overrides are being provided in mapping_addition.
# The allowed values are one of index or template.
# The index option merges mappings the way they would be merged into an existing index.
# The template option merges mappings the way they would be merged into a template. Server default: index.
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
# when they occur.
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
#
# This code was automatically generated 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
module Actions
# Sets a cluster wide upgrade_mode setting that prepares transform indices for an upgrade.
#
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-set-upgrade-mode.html
#
def set_upgrade_mode(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'transform.set_upgrade_mode' }

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

method = Elasticsearch::API::HTTP_POST
path = '_transform/set_upgrade_mode'
params = {}

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
end
2 changes: 1 addition & 1 deletion elasticsearch-api/lib/elasticsearch/api/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
module Elasticsearch
module API
VERSION = '9.2.0'.freeze
ES_SPECIFICATION_COMMIT = 'e64428b1c0ca92962cbbe474009513fc0e59d89f'.freeze
ES_SPECIFICATION_COMMIT = '65e7af798ccf8e50bffe7028e62a3f842c299dc8'.freeze
end
end
Original file line number Diff line number Diff line change
@@ -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#set_upgrade_mode' do
let(:expected_args) do
[
'POST',
'_transform/set_upgrade_mode',
{},
nil,
{},
{ endpoint: 'transform.set_upgrade_mode' }
]
end

it 'performs the request' do
expect(client_double.transform.set_upgrade_mode).to be_a Elasticsearch::API::Response
end
end