Files
elasticsearch-js/docs/reference/api/WatcherPutWatchRequest.md
2025-05-28 10:02:30 -05:00

2.8 KiB

WatcherPutWatchRequest [interface-WatcherPutWatchRequest]

Name Type Description
actions Record<string, WatcherAction> The list of actions that will be run if the condition matches.
active boolean The initial state of the watch. The default value is true, which means the watch is active by default.
body string ({ [key: string]: any; } & { id?: never; active?: never; if_primary_term?: never; if_seq_no?: never; version?: never; actions?: never; condition?: never; input?: never; metadata?: never; throttle_period?: never; throttle_period_in_millis?: never; transform?: never; trigger?: never; })
condition WatcherConditionContainer The condition that defines if the actions should be run.
id Id The identifier for the watch.
if_primary_term long only update the watch if the last operation that has changed the watch has the specified primary term
if_seq_no SequenceNumber only update the watch if the last operation that has changed the watch has the specified sequence number
input WatcherInputContainer The input that defines the input that loads the data for the watch.
metadata Metadata Metadata JSON that will be copied into the history entries.
querystring { [key: string]: any; } & { id?: never; active?: never; if_primary_term?: never; if_seq_no?: never; version?: never; actions?: never; condition?: never; input?: never; metadata?: never; throttle_period?: never; throttle_period_in_millis?: never; transform?: never; trigger?: never; } All values in querystring will be added to the request querystring.
throttle_period_in_millis DurationValue<UnitMillis> Minimum time in milliseconds between actions being run. Defaults to 5000. If both this value and the throttle_period parameter are specified, Watcher uses the last parameter included in the request.
throttle_period Duration The minimum time between actions being run. The default is 5 seconds. This default can be changed in the config file with the setting xpack.watcher.throttle.period.default_period. If both this value and the throttle_period_in_millis parameter are specified, Watcher uses the last parameter included in the request.
transform TransformContainer The transform that processes the watch payload to prepare it for the watch actions.
trigger WatcherTriggerContainer The trigger that defines when the watch should run.
version VersionNumber Explicit version number for concurrency control