Files
elasticsearch-js/docs/reference-watcher-execute_watch.asciidoc
2024-12-05 14:46:46 -06:00

72 lines
4.6 KiB
Plaintext

[[reference-watcher-execute_watch]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|| You should update the script that does the generation, which can be found in: ||
|| https://github.com/elastic/elastic-client-generator-js ||
|| ||
|| You can run the script with the following command: ||
|| npm run elasticsearch -- --version <version> ||
|| ||
|| ||
|| ||
===========================================================================================================================
////////
[discrete]
=== client.watcher.executeWatch
This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes. For testing and debugging purposes, you also have fine-grained control on how the watch runs. You can execute the watch without executing all of its actions or alternatively by simulating them. You can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after execution.
{ref}/watcher-api-execute-watch.html[{es} documentation]
[discrete]
==== Function signature
[source,ts]
----
(WatcherExecuteWatchRequest, options?): Promise<WatcherExecuteWatchResponse>
----
[discrete]
===== `WatcherExecuteWatchRequest`
[source,ts]
----
interface WatcherExecuteWatchRequest extends <<shared-type-request-base, RequestBase>> {
id?: <<shared-type-id, Id>>
debug?: boolean
action_modes?: Record<string, WatcherActionExecutionMode>
alternative_input?: Record<string, any>
ignore_condition?: boolean
record_execution?: boolean
simulated_actions?: WatcherSimulatedActions
trigger_data?: WatcherScheduleTriggerEvent
watch?: WatcherWatch
}
----
[discrete]
===== `WatcherExecuteWatchResponse`
[source,ts]
----
interface WatcherExecuteWatchResponse {
_id: <<shared-type-id, Id>>
watch_record: WatcherExecuteWatchWatchRecord
}
----