elasticsearch-api/lib/elasticsearch/api/actions/indices/put_alias.rb
# Creates or updates 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 [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The settings for the alias, such as `routing` or `filter`
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
#
Creates or updates an alias.
Creates or updates an alias .
def put_alias(arguments = {})
          raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
          raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
          headers = arguments.delete(:headers) || {}
          body = arguments.delete(:body)
          arguments = arguments.clone
          _index = arguments.delete(:index)
          _name = arguments.delete(:name)
          method = Elasticsearch::API::HTTP_PUT
          path   = if _index && _name
                     "#{Utils.__listify(_index)}/_aliases/#{Utils.__listify(_name)}"
                   end
          params = Utils.process_params(arguments)
          perform_request(method, path, params, body, headers).body
        end
def put_alias ( arguments = { } ) raise ArgumentError , "Required argument 'index' missing" unless arguments [ :index ] raise ArgumentError , "Required argument 'name' missing" unless arguments [ :name ] headers = arguments . delete ( :headers ) || { } body = arguments . delete ( :body ) arguments = arguments . clone _index = arguments . delete ( :index ) _name = arguments . delete ( :name ) method = Elasticsearch :: API :: HTTP_PUT path = if _index && _name "#{Utils.__listify(_index)}/_aliases/#{Utils.__listify(_name)}" end params = Utils . process_params ( arguments ) perform_request ( method , path , params , body , headers ) . body end
Creates or updates an alias.
Creates or updates an alias .
arguments
:body The settings for the alias, such as `routing` or `filter`
: body The settings for the alias such as ` routing ` or ` filter `
see
None