mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
This commit converts the watcher execution context to use the joda compat java time objects. It also again removes the joda methods from the painless whitelist.
39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
[[painless-watcher-transform-context]]
|
|
=== Watcher transform context
|
|
|
|
Use a Painless script to {xpack-ref}/transform-script.html[transform] watch
|
|
data into a new payload for use in a response to a condition.
|
|
|
|
*Variables*
|
|
|
|
`params` (`Map`, read-only)::
|
|
User-defined parameters passed in as part of the query.
|
|
|
|
`ctx['watch_id']` (`String`, read-only)::
|
|
The id of the watch.
|
|
|
|
`ctx['execution_time']` (`ZonedDateTime`, read-only)::
|
|
The start time for the watch.
|
|
|
|
`ctx['trigger']['scheduled_time']` (`ZonedDateTime`, read-only)::
|
|
The scheduled trigger time for the watch.
|
|
|
|
`ctx['trigger']['triggered_time']` (`ZonedDateTime`, read-only)::
|
|
The actual trigger time for the watch.
|
|
|
|
`ctx['metadata']` (`Map`, read-only)::
|
|
Any metadata associated with the watch.
|
|
|
|
`ctx['payload']` (`Map`, read-only)::
|
|
The accessible watch data based upon the
|
|
{xpack-ref}/input.html[watch input].
|
|
|
|
|
|
*Return*
|
|
|
|
`Object`::
|
|
The new payload.
|
|
|
|
*API*
|
|
|
|
The standard <<painless-api-reference, Painless API>> is available. |