set-upgrade-mode.asciidoc 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --
  2. :api: set-upgrade-mode
  3. :request: SetUpgradeModeRequest
  4. :response: AcknowledgedResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Set upgrade mode API
  9. Temporarily halts all {ml} job and {dfeed} tasks when `enabled=true`. Their
  10. reported states remain unchanged. Consequently, when exiting upgrade mode the halted {ml} jobs and
  11. {dfeeds} will return to their previous state.
  12. It accepts a +{request}+ object and responds with a +{response}+ object.
  13. When `enabled=true`, no new jobs can be opened, and no job or {dfeed} tasks will
  14. be running. Be sure to set `enabled=false` once upgrade actions are completed.
  15. [id="{upid}-{api}-request"]
  16. ==== Set upgrade mode request
  17. A +{request}+ object gets created setting the desired `enabled` state.
  18. ["source","java",subs="attributes,callouts,macros"]
  19. --------------------------------------------------
  20. include-tagged::{doc-tests-file}[{api}-request]
  21. --------------------------------------------------
  22. <1> Constructing a new request referencing enabling upgrade mode
  23. <2> Optionally setting the `timeout` value for how long the
  24. execution should wait.
  25. [id="{upid}-{api}-response"]
  26. ==== Set upgrade mode response
  27. ["source","java",subs="attributes,callouts,macros"]
  28. --------------------------------------------------
  29. include-tagged::{doc-tests-file}[{api}-response]
  30. --------------------------------------------------
  31. <1> `isAcknowledged()` from the +{response}+ indicates if the setting was set successfully.
  32. include::../execution.asciidoc[]