put-trained-model-alias.asciidoc 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --
  2. :api: put-trained-model-alias
  3. :request: PutTrainedModelAliasRequest
  4. :response: AcknowledgedResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Create or update trained model alias API
  9. Creates or reassigns a trained model alias.
  10. The API accepts a +{request}+ object as a request and returns a +{response}+.
  11. The created trained model alias can then be used for other APIs in the stack
  12. instead of the referenced model id.
  13. [id="{upid}-{api}-request"]
  14. ==== Request
  15. A +{request}+ requires the following arguments:
  16. ["source","java",subs="attributes,callouts,macros"]
  17. --------------------------------------------------
  18. include-tagged::{doc-tests-file}[{api}-request]
  19. --------------------------------------------------
  20. <1> The trained model alias to create or reassign
  21. <2> The trained model id to which to assign the alias
  22. <3> (Optional) whether or not to reassign the model alias if it
  23. is already pointing to a model. Defaults to false.
  24. include::../execution.asciidoc[]
  25. [id="{upid}-{api}-response"]
  26. ==== Response
  27. The returned +{response}+
  28. ["source","java",subs="attributes,callouts,macros"]
  29. --------------------------------------------------
  30. include-tagged::{doc-tests-file}[{api}-response]
  31. --------------------------------------------------