put_component_template.asciidoc 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. --
  2. :api: put-component-template
  3. :request: PutComponentTemplateRequest
  4. :response: AcknowledgedResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Create or update component template API
  8. Creates or updates a component template.
  9. [id="{upid}-{api}-request"]
  10. ==== Request
  11. A +{request}+ specifies the name of the component template and the template definition,
  12. which can consist of the settings, mappings or aliases, together with a version (which
  13. can be used to simply component template management by external systems) and a metadata
  14. map consisting of user specific information.
  15. ["source","java",subs="attributes,callouts,macros"]
  16. --------------------------------------------------
  17. include-tagged::{doc-tests-file}[{api}-request]
  18. --------------------------------------------------
  19. <1> The name of the component template
  20. <2> Template configuration containing the settings, mappings and aliases for this component template
  21. ===== Version
  22. A component template can optionally specify a version number which can be used to simplify template
  23. management by external systems.
  24. ["source","java",subs="attributes,callouts,macros"]
  25. --------------------------------------------------
  26. include-tagged::{doc-tests-file}[{api}-request-version]
  27. --------------------------------------------------
  28. <1> The version number of the template
  29. === Optional arguments
  30. The following arguments can optionally be provided:
  31. ["source","java",subs="attributes,callouts,macros"]
  32. --------------------------------------------------
  33. include-tagged::{doc-tests-file}[{api}-request-create]
  34. --------------------------------------------------
  35. <1> To force to only create a new template; do not overwrite the existing template
  36. ["source","java",subs="attributes,callouts,macros"]
  37. --------------------------------------------------
  38. include-tagged::{doc-tests-file}[{api}-request-masterTimeout]
  39. --------------------------------------------------
  40. <1> Timeout to connect to the master node as a `TimeValue`
  41. include::../execution.asciidoc[]
  42. [id="{upid}-{api}-response"]
  43. ==== Response
  44. The returned +{response}+ allows to retrieve information about the
  45. executed operation as follows:
  46. ["source","java",subs="attributes,callouts,macros"]
  47. --------------------------------------------------
  48. include-tagged::{doc-tests-file}[{api}-response]
  49. --------------------------------------------------
  50. <1> Indicates whether all of the nodes have acknowledged the request