elasticsearch/docs/java-rest/high-level/ml/put-trained-model-alias.asciidoc
Benjamin Trent 2ee6dc37b6
[ML][HLRC] adds put and delete trained model alias APIs to rest high-level client (#69214)
adds put (and reassign) and delete trained model alias APIs to the rest high-level client.

This adds some serialization objects and request wrappers.
2021-02-19 14:18:26 -05:00

41 lines
1.2 KiB
Text

--
:api: put-trained-model-alias
:request: PutTrainedModelAliasRequest
:response: AcknowledgedResponse
--
[role="xpack"]
[id="{upid}-{api}"]
=== Put trained model alias API
beta::[]
Creates or reassigns a trained model alias.
The API accepts a +{request}+ object as a request and returns a +{response}+.
The created trained model alias can then be used for other APIs in the stack
instead of the referenced model id.
[id="{upid}-{api}-request"]
==== Put trained model alias request
A +{request}+ requires the following arguments:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
<1> The trained model alias to create or reassign
<2> The trained model id to which to assign the alias
<3> (Optional) whether or not to reassign the model alias if it
is already pointing to a model. Defaults to false.
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== Response
The returned +{response}+
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------