2018-10-05 11:45:46 -04:00
|
|
|
--
|
|
|
|
:api: update-job
|
|
|
|
:request: UpdateJobRequest
|
|
|
|
:response: PutJobResponse
|
|
|
|
--
|
2019-09-10 11:26:56 -04:00
|
|
|
[role="xpack"]
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}"]
|
2019-08-06 14:05:01 -04:00
|
|
|
=== Update {anomaly-job} API
|
2018-09-06 08:18:09 -04:00
|
|
|
|
2019-08-06 14:05:01 -04:00
|
|
|
Provides the ability to update an {anomaly-job}.
|
|
|
|
It accepts a +{request}+ object and responds with a +{response}+ object.
|
2018-09-06 08:18:09 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-request"]
|
2019-08-06 14:05:01 -04:00
|
|
|
==== Update {anomaly-job} request
|
2018-09-06 08:18:09 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
An +{request}+ object gets created with a `JobUpdate` object.
|
2018-09-06 08:18:09 -04:00
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
2018-09-06 08:18:09 -04:00
|
|
|
--------------------------------------------------
|
2019-08-06 14:05:01 -04:00
|
|
|
<1> Constructing a new request referencing a `JobUpdate` object.
|
2018-09-06 08:18:09 -04:00
|
|
|
|
2019-08-06 14:05:01 -04:00
|
|
|
==== Optional arguments
|
2018-09-06 08:18:09 -04:00
|
|
|
|
2019-08-06 14:05:01 -04:00
|
|
|
The `JobUpdate` object has many optional arguments with which to update an
|
|
|
|
existing {anomaly-job}. An existing, non-null `jobId` must be referenced in its
|
|
|
|
creation.
|
2018-09-06 08:18:09 -04:00
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-options]
|
2018-09-06 08:18:09 -04:00
|
|
|
--------------------------------------------------
|
2019-08-06 14:05:01 -04:00
|
|
|
<1> Mandatory, non-null `jobId` referencing an existing {anomaly-job}.
|
|
|
|
<2> Updated description.
|
|
|
|
<3> Updated analysis limits.
|
|
|
|
<4> Updated background persistence interval.
|
|
|
|
<5> Updated analysis config's categorization filters.
|
|
|
|
<6> Updated detectors through the `JobUpdate.DetectorUpdate` object.
|
|
|
|
<7> Updated group membership.
|
|
|
|
<8> Updated result retention.
|
|
|
|
<9> Updated model plot configuration.
|
|
|
|
<10> Updated model snapshot retention setting.
|
|
|
|
<11> Updated custom settings.
|
|
|
|
<12> Updated renormalization window.
|
2018-09-06 08:18:09 -04:00
|
|
|
|
|
|
|
Included with these options are specific optional `JobUpdate.DetectorUpdate` updates.
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-detector-options]
|
2018-09-06 08:18:09 -04:00
|
|
|
--------------------------------------------------
|
2019-08-06 14:05:01 -04:00
|
|
|
<1> The index of the detector. `O` means unknown.
|
|
|
|
<2> The optional description of the detector.
|
|
|
|
<3> The `DetectionRule` rules that apply to this detector.
|
2018-09-06 08:18:09 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
include::../execution.asciidoc[]
|
2018-09-06 08:18:09 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
[id="{upid}-{api}-response"]
|
2019-08-06 14:05:01 -04:00
|
|
|
==== Update {anomaly-job} response
|
2018-09-06 08:18:09 -04:00
|
|
|
|
2018-10-05 11:45:46 -04:00
|
|
|
A +{response}+ contains the updated `Job` object
|
2018-09-06 08:18:09 -04:00
|
|
|
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
|
|
--------------------------------------------------
|
2018-10-05 11:45:46 -04:00
|
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
2018-09-06 08:18:09 -04:00
|
|
|
--------------------------------------------------
|
2019-08-06 14:05:01 -04:00
|
|
|
<1> `getResponse()` returns the updated `Job` object.
|