delete-job.asciidoc 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --
  2. :api: delete-job
  3. :request: DeleteJobRequest
  4. :response: AcknowledgedResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Delete {anomaly-job} API
  8. Deletes an {anomaly-job} that exists in the cluster.
  9. [id="{upid}-{api}-request"]
  10. ==== Delete {anomaly-job} request
  11. A +{request}+ object requires a non-null `jobId` and can optionally set `force`.
  12. ["source","java",subs="attributes,callouts,macros"]
  13. ---------------------------------------------------
  14. include-tagged::{doc-tests-file}[{api}-request]
  15. ---------------------------------------------------
  16. <1> Constructing a new request referencing an existing `jobId`
  17. ==== Optional arguments
  18. The following arguments are optional:
  19. ["source","java",subs="attributes,callouts,macros"]
  20. ---------------------------------------------------
  21. include-tagged::{doc-tests-file}[{api}-request-force]
  22. ---------------------------------------------------
  23. <1> Use to forcefully delete an opened job. This method is quicker than closing
  24. and deleting the job. Defaults to `false`.
  25. ["source","java",subs="attributes,callouts,macros"]
  26. ---------------------------------------------------
  27. include-tagged::{doc-tests-file}[{api}-request-wait-for-completion]
  28. ---------------------------------------------------
  29. <1> Use to set whether the request should wait until the operation has completed
  30. before returning. Defaults to `true`.
  31. [id="{upid}-{api}-response"]
  32. ==== Delete {anomaly-job} response
  33. The returned +{response}+ object indicates the acknowledgement of the job
  34. deletion or the deletion task depending on whether the request was set to wait
  35. for completion:
  36. ["source","java",subs="attributes,callouts,macros"]
  37. ---------------------------------------------------
  38. include-tagged::{doc-tests-file}[{api}-response]
  39. ---------------------------------------------------
  40. <1> Whether job deletion was acknowledged or not. It will be `null` when set
  41. to not wait for completion.
  42. <2> The ID of the job deletion task. It will be `null` when set to wait for
  43. completion.
  44. include::../execution.asciidoc[]