elasticsearch-api/lib/elasticsearch/api/actions/indices/put_index_template.rb
def put_index_template(arguments = {})
          raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
          raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]

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

          body = arguments.delete(:body)

          arguments = arguments.clone

          _name = arguments.delete(:name)

          method = Elasticsearch::API::HTTP_PUT
          path   = "_index_template/#{Utils.__listify(_name)}"
          params = Utils.process_params(arguments)

          perform_request(method, path, params, body, headers).body
        end
# Creates or updates an index template.
#
# @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] :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*)
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
#
Creates or updates an index template.
Creates or updates an index template .
def put_index_template(arguments = {})
          raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
          raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
          headers = arguments.delete(:headers) || {}
          body = arguments.delete(:body)
          arguments = arguments.clone
          _name = arguments.delete(:name)
          method = Elasticsearch::API::HTTP_PUT
          path   = "_index_template/#{Utils.__listify(_name)}"
          params = Utils.process_params(arguments)
          perform_request(method, path, params, body, headers).body
        end
def put_index_template ( arguments = { } ) raise ArgumentError , "Required argument 'body' missing" unless arguments [ :body ] raise ArgumentError , "Required argument 'name' missing" unless arguments [ :name ] headers = arguments . delete ( :headers ) || { } body = arguments . delete ( :body ) arguments = arguments . clone _name = arguments . delete ( :name ) method = Elasticsearch :: API :: HTTP_PUT path = "_index_template/#{Utils.__listify(_name)}" params = Utils . process_params ( arguments ) perform_request ( method , path , params , body , headers ) . body end
Creates or updates an index template.
Creates or updates an index template .
arguments
:body The template definition (*Required*)
: body The template definition ( * Required * )
see
None