Class PutWatchRequest
- All Implemented Interfaces:
JsonpSerializable
.watches index and its
trigger is immediately registered with the relevant trigger engine. Typically
for the schedule trigger, the scheduler is the trigger engine.
IMPORTANT: You must use Kibana or this API to create a watch. Do not add a
watch directly to the .watches index by using the Elasticsearch
index API. If Elasticsearch security features are enabled, do not give users
write privileges on the .watches index.
When you add a watch you can also define its initial active state by setting the active parameter.
When Elasticsearch security features are enabled, your watch can index or
search only on indices for which the user that stored the watch has
privileges. If the user is able to read index a, but not index
b, the same will apply when the watch runs.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<PutWatchRequest>Json deserializer forPutWatchRequeststatic final Endpoint<PutWatchRequest,PutWatchResponse, ErrorResponse> Endpoint "watcher.put_watch". -
Method Summary
Modifier and TypeMethodDescriptionactions()The list of actions that will be run if the condition matches.final Booleanactive()The initial state of the watch.final ConditionThe condition that defines if the actions should be run.final Stringid()Required - The identifier for the watch.final Longonly update the watch if the last operation that has changed the watch has the specified primary termfinal LongifSeqNo()only update the watch if the last operation that has changed the watch has the specified sequence numberfinal Inputinput()The input that defines the input that loads the data for the watch.metadata()Metadata JSON that will be copied into the history entries.static PutWatchRequestvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal TimeThe minimum time between actions being run.final LongMinimum time in milliseconds between actions being run.final TransformThe transform that processes the watch payload to prepare it for the watch actions.final Triggertrigger()The trigger that defines when the watch should run.final Longversion()Explicit version number for concurrency controlMethods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forPutWatchRequest -
_ENDPOINT
Endpoint "watcher.put_watch".
-
-
Method Details
-
of
public static PutWatchRequest of(Function<PutWatchRequest.Builder, ObjectBuilder<PutWatchRequest>> fn) -
actions
The list of actions that will be run if the condition matches.API name:
actions -
active
The initial state of the watch. The default value istrue, which means the watch is active by default.API name:
active -
condition
The condition that defines if the actions should be run.API name:
condition -
id
Required - The identifier for the watch.API name:
id -
ifPrimaryTerm
only update the watch if the last operation that has changed the watch has the specified primary termAPI name:
if_primary_term -
ifSeqNo
only update the watch if the last operation that has changed the watch has the specified sequence numberAPI name:
if_seq_no -
input
The input that defines the input that loads the data for the watch.API name:
input -
metadata
Metadata JSON that will be copied into the history entries.API name:
metadata -
throttlePeriod
The minimum time between actions being run. The default is 5 seconds. This default can be changed in the config file with the settingxpack.watcher.throttle.period.default_period. If both this value and thethrottle_period_in_millisparameter are specified, Watcher uses the last parameter included in the request.API name:
throttle_period -
throttlePeriodInMillis
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.API name:
throttle_period_in_millis -
transform
The transform that processes the watch payload to prepare it for the watch actions.API name:
transform -
trigger
The trigger that defines when the watch should run.API name:
trigger -
version
Explicit version number for concurrency controlAPI name:
version -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupPutWatchRequestDeserializer
protected static void setupPutWatchRequestDeserializer(ObjectDeserializer<PutWatchRequest.Builder> op)
-