elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb
# Creates a new model alias (or reassigns an existing one) to refer to the trained model
#
# @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 [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html
#
Creates a new model alias (or reassigns an existing one) to refer to the trained model
Creates a new model alias ( or reassigns an existing one ) to refer to the trained model
def put_trained_model_alias(arguments = {})
          raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
          raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias]
          headers = arguments.delete(:headers) || {}
          body = nil
          arguments = arguments.clone
          _model_alias = arguments.delete(:model_alias)
          _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)}"
          params = Utils.process_params(arguments)
          perform_request(method, path, params, body, headers).body
        end
def put_trained_model_alias ( arguments = { } ) raise ArgumentError , "Required argument 'model_id' missing" unless arguments [ :model_id ] raise ArgumentError , "Required argument 'model_alias' missing" unless arguments [ :model_alias ] headers = arguments . delete ( :headers ) || { } body = nil arguments = arguments . clone _model_alias = arguments . delete ( :model_alias ) _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)}" params = Utils . process_params ( arguments ) perform_request ( method , path , params , body , headers ) . body end
Creates a new model alias (or reassigns an existing one) to refer to the trained model
Creates a new model alias ( or reassigns an existing one ) to refer to the trained model
arguments
:headers Custom HTTP headers
: headers Custom HTTP headers
see
None