Class ExecuteWatchRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.watcher.ExecuteWatchRequest
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class ExecuteWatchRequest extends RequestBase implements JsonpSerializable
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.
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExecuteWatchRequest.Builder
Builder forExecuteWatchRequest
.Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<ExecuteWatchRequest>
_DESERIALIZER
Json deserializer forExecuteWatchRequest
static Endpoint<ExecuteWatchRequest,ExecuteWatchResponse,ErrorResponse>
_ENDPOINT
Endpoint "watcher.execute_watch
". -
Method Summary
Modifier and Type Method Description java.util.Map<java.lang.String,ActionExecutionMode>
actionModes()
Determines how to handle the watch actions as part of the watch execution.java.util.Map<java.lang.String,JsonData>
alternativeInput()
When present, the watch uses this object as a payload instead of executing its own input.java.lang.Boolean
debug()
Defines whether the watch runs in debug mode.java.lang.String
id()
Identifier for the watch.java.lang.Boolean
ignoreCondition()
When set totrue
, the watch execution uses the always condition.static ExecuteWatchRequest
of(java.util.function.Function<ExecuteWatchRequest.Builder,ObjectBuilder<ExecuteWatchRequest>> fn)
java.lang.Boolean
recordExecution()
When set totrue
, the watch record representing the watch execution result is persisted to the.watcher-history
index for the current time.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
Serialize this object to JSON.protected void
serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupExecuteWatchRequestDeserializer(ObjectDeserializer<ExecuteWatchRequest.Builder> op)
SimulatedActions
simulatedActions()
API name:simulated_actions
ScheduleTriggerEvent
triggerData()
This structure is parsed as the data of the trigger event that will be used during the watch executionWatch
watch()
When present, this watch is used instead of the one specified in the request.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forExecuteWatchRequest
-
_ENDPOINT
Endpoint "watcher.execute_watch
".
-
-
Method Details
-
of
public static ExecuteWatchRequest of(java.util.function.Function<ExecuteWatchRequest.Builder,ObjectBuilder<ExecuteWatchRequest>> fn) -
actionModes
Determines how to handle the watch actions as part of the watch execution.API name:
action_modes
-
alternativeInput
When present, the watch uses this object as a payload instead of executing its own input.API name:
alternative_input
-
debug
@Nullable public final java.lang.Boolean debug()Defines whether the watch runs in debug mode.API name:
debug
-
id
@Nullable public final java.lang.String id()Identifier for the watch.API name:
id
-
ignoreCondition
@Nullable public final java.lang.Boolean ignoreCondition()When set totrue
, the watch execution uses the always condition. This can also be specified as an HTTP parameter.API name:
ignore_condition
-
recordExecution
@Nullable public final java.lang.Boolean recordExecution()When set totrue
, the watch record representing the watch execution result is persisted to the.watcher-history
index for the current time. In addition, the status of the watch is updated, possibly throttling subsequent executions. This can also be specified as an HTTP parameter.API name:
record_execution
-
simulatedActions
API name:simulated_actions
-
triggerData
This structure is parsed as the data of the trigger event that will be used during the watch executionAPI name:
trigger_data
-
watch
When present, this watch is used instead of the one specified in the request. This watch is not persisted to the index and record_execution cannot be set.API name:
watch
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupExecuteWatchRequestDeserializer
protected static void setupExecuteWatchRequestDeserializer(ObjectDeserializer<ExecuteWatchRequest.Builder> op)
-