.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Search::Elasticsearch::Client::8_0::Direct::Watcher 3pm" .TH Search::Elasticsearch::Client::8_0::Direct::Watcher 3pm 2024-02-04 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Search::Elasticsearch::Client::8_0::Direct::Watcher \- Plugin providing Watcher API for Search::Elasticsearch 8.x .SH VERSION .IX Header "VERSION" version 8.12 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& my $response = $es\->watcher\->start(); .Ve .SS DESCRIPTION .IX Subsection "DESCRIPTION" This class extends the Search::Elasticsearch client with a \f(CW\*(C`watcher\*(C'\fR namespace, to support the Watcher APIs . .SH METHODS .IX Header "METHODS" The full documentation for the Watcher feature is available here: .ie n .SS put_watch() .el .SS \f(CWput_watch()\fP .IX Subsection "put_watch()" .Vb 4 \& $response = $es\->watcher\->put_watch( \& id => $watch_id, # required \& body => {...} \& ); .Ve .PP The \f(CWput_watch()\fR method is used to register a new watcher or to update an existing watcher. .PP See the put_watch docs for more information. .PP Query string parameters: \f(CW\*(C`active\*(C'\fR, \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`if_primary_term\*(C'\fR, \f(CW\*(C`if_seq_no\*(C'\fR, \f(CW\*(C`master_timeout\*(C'\fR, \f(CW\*(C`version\*(C'\fR .ie n .SS get_watch() .el .SS \f(CWget_watch()\fP .IX Subsection "get_watch()" .Vb 3 \& $response = $es\->watcher\->get_watch( \& id => $watch_id, # required \& ); .Ve .PP The \f(CWget_watch()\fR method is used to retrieve a watch by ID. .PP See the get_watch docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS delete_watch() .el .SS \f(CWdelete_watch()\fP .IX Subsection "delete_watch()" .Vb 3 \& $response = $es\->watcher\->delete_watch( \& id => $watch_id, # required \& ); .Ve .PP The \f(CWdelete_watch()\fR method is used to delete a watch by ID. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`force\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`master_timeout\*(C'\fR .PP See the delete_watch docs for more information. .ie n .SS execute_watch() .el .SS \f(CWexecute_watch()\fP .IX Subsection "execute_watch()" .Vb 4 \& $response = $es\->watcher\->execute_watch( \& id => $watch_id, # optional \& body => {...} # optional \& ); .Ve .PP The \f(CWexecute_watch()\fR method forces the execution of a previously registered watch. Optional parameters may be passed in the \f(CW\*(C`body\*(C'\fR. .PP Query string parameters: \f(CW\*(C`debug\*(C'\fR, \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .PP See the execute_watch docs for more information. .ie n .SS ack_watch() .el .SS \f(CWack_watch()\fP .IX Subsection "ack_watch()" .Vb 4 \& $response = $es\->watcher\->ack_watch( \& watch_id => $watch_id, # required \& action_id => $action_id | \e@action_ids # optional \& ); .Ve .PP The \f(CWack_watch()\fR method is used to manually throttle the execution of a watch. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`master_timeout\*(C'\fR .PP See the ack_watch docs for more information. .ie n .SS activate_watch() .el .SS \f(CWactivate_watch()\fP .IX Subsection "activate_watch()" .Vb 3 \& $response = $es\->watcher\->activate_watch( \& watch_id => $watch_id, # required \& ); .Ve .PP The \f(CWactivate_watch()\fR method is used to activate a deactive watch. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`master_timeout\*(C'\fR .PP See the activate_watch docs for more information. .ie n .SS deactivate_watch() .el .SS \f(CWdeactivate_watch()\fP .IX Subsection "deactivate_watch()" .Vb 3 \& $response = $es\->watcher\->deactivate_watch( \& watch_id => $watch_id, # required \& ); .Ve .PP The \f(CWdeactivate_watch()\fR method is used to deactivate an active watch. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`master_timeout\*(C'\fR .PP See the deactivate_watch docs for more information. .ie n .SS stats() .el .SS \f(CWstats()\fP .IX Subsection "stats()" .Vb 3 \& $response = $es\->watcher\->stats( \& metric => $metric # optional \& ); .Ve .PP The \f(CWstats()\fR method returns information about the status of the watcher plugin. .PP See the stats docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS stop() .el .SS \f(CWstop()\fP .IX Subsection "stop()" .Vb 1 \& $response = $es\->watcher\->stop(); .Ve .PP The \f(CWstop()\fR method stops the watcher service if it is running. .PP See the stop docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS start() .el .SS \f(CWstart()\fP .IX Subsection "start()" .Vb 1 \& $response = $es\->watcher\->start(); .Ve .PP The \f(CWstart()\fR method starts the watcher service if it is not already running. .PP See the start docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS restart() .el .SS \f(CWrestart()\fP .IX Subsection "restart()" .Vb 1 \& $response = $es\->watcher\->restart(); .Ve .PP The \f(CWrestart()\fR method stops then starts the watcher service. .PP See the restart docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .SH AUTHOR .IX Header "AUTHOR" Enrico Zimuel .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2024 by Elasticsearch BV. .PP This is free software, licensed under: .PP .Vb 1 \& The Apache License, Version 2.0, January 2004 .Ve