Sha256: b3b05817040149b82fc28efeb5b4cfab09104b94fc7b084711f68f998d5b221f

Contents?: true

Size: 926 Bytes

Versions: 97

Compression:

Stored size: 926 Bytes

Contents

# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
# or more contributor license agreements. Licensed under the Elastic License;
# you may not use this file except in compliance with the Elastic License.

module Elasticsearch
  module API
    module Actions

      # @option arguments [String] :name The name of the alias (*Required*)
      # @option arguments [Hash]   :The alias definition(*Required*)

      def put_alias(arguments={})
        raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
        raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
        method = HTTP_PUT
        path   = Utils.__pathify Utils.__escape(arguments[:name])

        params = Utils.__validate_and_extract_params arguments
        body   = arguments[:body]
        perform_request(method, path, params, body.to_json).body
      end
    end
  end
end

Version data entries

97 entries across 97 versions & 2 rubygems

Version Path
logstash-output-elasticsearch-11.22.9-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.22.8-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.22.7-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.22.6-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.22.5-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.22.4-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.4.2-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.22.3-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.22.2-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.22.1-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.22.0-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.21.0-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.20.1-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.20.0-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.19.0-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.18.0-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-11.17.0-java spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-test-10.3.0-x86_64-linux spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-test-11.16.1-x86_64-linux spec/support/elasticsearch/api/actions/put_alias.rb
logstash-output-elasticsearch-test-11.16.0-x86_64-linux spec/support/elasticsearch/api/actions/put_alias.rb