update-job.asciidoc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. --
  2. :api: update-job
  3. :request: UpdateJobRequest
  4. :response: PutJobResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Update {anomaly-job} API
  9. Provides the ability to update an {anomaly-job}.
  10. It accepts a +{request}+ object and responds with a +{response}+ object.
  11. [id="{upid}-{api}-request"]
  12. ==== Update {anomaly-job} request
  13. An +{request}+ object gets created with a `JobUpdate` object.
  14. ["source","java",subs="attributes,callouts,macros"]
  15. --------------------------------------------------
  16. include-tagged::{doc-tests-file}[{api}-request]
  17. --------------------------------------------------
  18. <1> Constructing a new request referencing a `JobUpdate` object.
  19. ==== Optional arguments
  20. The `JobUpdate` object has many optional arguments with which to update an
  21. existing {anomaly-job}. An existing, non-null `jobId` must be referenced in its
  22. creation.
  23. ["source","java",subs="attributes,callouts,macros"]
  24. --------------------------------------------------
  25. include-tagged::{doc-tests-file}[{api}-options]
  26. --------------------------------------------------
  27. <1> Mandatory, non-null `jobId` referencing an existing {anomaly-job}.
  28. <2> Updated description.
  29. <3> Updated analysis limits.
  30. <4> Updated background persistence interval.
  31. <5> Updated analysis config's categorization filters.
  32. <6> Updated detectors through the `JobUpdate.DetectorUpdate` object.
  33. <7> Updated group membership.
  34. <8> Updated result retention.
  35. <9> Updated model plot configuration.
  36. <10> Updated model snapshot retention setting.
  37. <11> Updated custom settings.
  38. <12> Updated renormalization window.
  39. Included with these options are specific optional `JobUpdate.DetectorUpdate` updates.
  40. ["source","java",subs="attributes,callouts,macros"]
  41. --------------------------------------------------
  42. include-tagged::{doc-tests-file}[{api}-detector-options]
  43. --------------------------------------------------
  44. <1> The index of the detector. `O` means unknown.
  45. <2> The optional description of the detector.
  46. <3> The `DetectionRule` rules that apply to this detector.
  47. include::../execution.asciidoc[]
  48. [id="{upid}-{api}-response"]
  49. ==== Update {anomaly-job} response
  50. A +{response}+ contains the updated `Job` object
  51. ["source","java",subs="attributes,callouts,macros"]
  52. --------------------------------------------------
  53. include-tagged::{doc-tests-file}[{api}-response]
  54. --------------------------------------------------
  55. <1> `getResponse()` returns the updated `Job` object.