Elasticsearch/Client/7_0/Direct/Watcher.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 14 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # Licensed to Elasticsearch B.V under one or more agreements.
2 # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3 # See the LICENSE file in the project root for more information
4  
5 package Search::Elasticsearch::Client::7_0::Direct::Watcher;
6 $Search::Elasticsearch::Client::7_0::Direct::Watcher::VERSION = '7.30_1'; # TRIAL
7  
8 $Search::Elasticsearch::Client::7_0::Direct::Watcher::VERSION = '7.301';
9 use Moo;
10 with 'Search::Elasticsearch::Client::7_0::Role::API';
11 with 'Search::Elasticsearch::Role::Client::Direct';
12 use namespace::clean;
13  
14 __PACKAGE__->_install_api('watcher');
15  
16 1;
17  
18 =pod
19  
20 =encoding UTF-8
21  
22 =head1 NAME
23  
24 Search::Elasticsearch::Client::7_0::Direct::Watcher - Plugin providing Watcher API for Search::Elasticsearch 7.x
25  
26 =head1 VERSION
27  
28 version 7.30_1
29  
30 =head1 SYNOPSIS
31  
32 my $response = $es->watcher->start();
33  
34 =head2 DESCRIPTION
35  
36 This class extends the L<Search::Elasticsearch> client with a C<watcher>
37 namespace, to support the
38 L<Watcher APIs|https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api.html>.
39  
40 =head1 METHODS
41  
42 The full documentation for the Watcher feature is available here:
43 L<https://www.elastic.co/guide/en/x-pack/current/xpack-alerting.html>
44  
45 =head2 C<put_watch()>
46  
47 $response = $es->watcher->put_watch(
48 id => $watch_id, # required
49 body => {...}
50 );
51  
52 The C<put_watch()> method is used to register a new watcher or to update
53 an existing watcher.
54  
55 See the L<put_watch docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html>
56 for more information.
57  
58 Query string parameters:
59 C<active>,
60 C<error_trace>,
61 C<human>,
62 C<if_primary_term>,
63 C<if_seq_no>,
64 C<master_timeout>,
65 C<version>
66  
67 =head2 C<get_watch()>
68  
69 $response = $es->watcher->get_watch(
70 id => $watch_id, # required
71 );
72  
73 The C<get_watch()> method is used to retrieve a watch by ID.
74  
75 See the L<get_watch docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html>
76 for more information.
77  
78 Query string parameters:
79 C<error_trace>,
80 C<human>
81  
82 =head2 C<delete_watch()>
83  
84 $response = $es->watcher->delete_watch(
85 id => $watch_id, # required
86 );
87  
88 The C<delete_watch()> method is used to delete a watch by ID.
89  
90 Query string parameters:
91 C<error_trace>,
92 C<force>,
93 C<human>,
94 C<master_timeout>
95  
96 See the L<delete_watch docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html>
97 for more information.
98  
99 =head2 C<execute_watch()>
100  
101 $response = $es->watcher->execute_watch(
102 id => $watch_id, # optional
103 body => {...} # optional
104 );
105  
106 The C<execute_watch()> method forces the execution of a previously
107 registered watch. Optional parameters may be passed in the C<body>.
108  
109 Query string parameters:
110 C<debug>,
111 C<error_trace>,
112 C<human>
113  
114 See the L<execute_watch docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html>
115 for more information.
116  
117 =head2 C<ack_watch()>
118  
119 $response = $es->watcher->ack_watch(
120 watch_id => $watch_id, # required
121 action_id => $action_id | \@action_ids # optional
122 );
123  
124 The C<ack_watch()> method is used to manually throttle the execution of
125 a watch.
126  
127 Query string parameters:
128 C<error_trace>,
129 C<human>,
130 C<master_timeout>
131  
132 See the L<ack_watch docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html>
133 for more information.
134  
135 =head2 C<activate_watch()>
136  
137 $response = $es->watcher->activate_watch(
138 watch_id => $watch_id, # required
139 );
140  
141 The C<activate_watch()> method is used to activate a deactive watch.
142  
143 Query string parameters:
144 C<error_trace>,
145 C<human>,
146 C<master_timeout>
147  
148 See the L<activate_watch docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html>
149 for more information.
150  
151 =head2 C<deactivate_watch()>
152  
153 $response = $es->watcher->deactivate_watch(
154 watch_id => $watch_id, # required
155 );
156  
157 The C<deactivate_watch()> method is used to deactivate an active watch.
158  
159 Query string parameters:
160 C<error_trace>,
161 C<human>,
162 C<master_timeout>
163  
164 See the L<deactivate_watch docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html>
165 for more information.
166  
167 =head2 C<stats()>
168  
169 $response = $es->watcher->stats(
170 metric => $metric # optional
171 );
172  
173 The C<stats()> method returns information about the status of the watcher plugin.
174  
175 See the L<stats docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html>
176 for more information.
177  
178 Query string parameters:
179 C<error_trace>,
180 C<human>
181  
182 =head2 C<stop()>
183  
184 $response = $es->watcher->stop();
185  
186 The C<stop()> method stops the watcher service if it is running.
187  
188 See the L<stop docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html>
189 for more information.
190  
191 Query string parameters:
192 C<error_trace>,
193 C<human>
194  
195 =head2 C<start()>
196  
197 $response = $es->watcher->start();
198  
199 The C<start()> method starts the watcher service if it is not already running.
200  
201 See the L<start docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html>
202 for more information.
203  
204 Query string parameters:
205 C<error_trace>,
206 C<human>
207  
208 =head2 C<restart()>
209  
210 $response = $es->watcher->restart();
211  
212 The C<restart()> method stops then starts the watcher service.
213  
214 See the L<restart docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-restart.html>
215 for more information.
216  
217 Query string parameters:
218 C<error_trace>,
219 C<human>
220  
221 =head1 AUTHOR
222  
223 Enrico Zimuel <enrico.zimuel@elastic.co>
224  
225 =head1 COPYRIGHT AND LICENSE
226  
227 This software is Copyright (c) 2020 by Elasticsearch BV.
228  
229 This is free software, licensed under:
230  
231 The Apache License, Version 2.0, January 2004
232  
233 =cut
234  
235 __END__