Debian Codegraph @

lib/Search/Elasticsearch/Client/8_0/Direct/CCR.pm

raw
1 # Licensed to Elasticsearch B.V. under one or more contributor
2 # license agreements. See the NOTICE file distributed with
3 # this work for additional information regarding copyright
4 # ownership. Elasticsearch B.V. licenses this file to you under
5 # the Apache License, Version 2.0 (the "License"); you may
6 # not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied. See the License for the
15 # specific language governing permissions and limitations
16 # under the License.
17
18 package Search::Elasticsearch::Client::8_0::Direct::CCR;
19 $Search::Elasticsearch::Client::8_0::Direct::CCR::VERSION = '8.12';
20 use Moo;
21 with 'Search::Elasticsearch::Client::8_0::Role::API';
22 with 'Search::Elasticsearch::Role::Client::Direct';
23 use Search::Elasticsearch::Util qw(parse_params);
24 use namespace::clean;
25 __PACKAGE__->_install_api('ccr');
26
27 1;
28
29 =pod
30
31 =encoding UTF-8
32
33 =head1 NAME
34
35 Search::Elasticsearch::Client::8_0::Direct::CCR - Plugin providing cross-cluster replication APIs for Search::Elasticsearch 8.x
36
37 =head1 VERSION
38
39 version 8.12
40
41 =head2 DESCRIPTION
42
43 This module provides methods to use the cross-cluster replication feature.
44
45 The full documentation for CCR is available here:
46 L<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-apis.html>
47
48 =head1 FOLLOW METHODS
49
50 =head2 C<follow()>
51
52 $response = $es->ccr->follow(
53 index => $index, # required
54 body => {...} # required
55 )
56
57 The C<follow()> method creates a new follower index that is configured to follow the referenced leader index.
58
59 Query string parameters:
60 C<error_trace>,
61 C<filter_path>,
62 C<human>,
63 C<wait_for_active_shards>
64
65 See the L<CCR follow docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html>
66 for more information.
67
68 =head2 C<pause_follow()>
69
70 $response = $es->ccr->pause_follow(
71 index => $index, # required
72 )
73
74 The C<pause_follow()> method pauses following of an index.
75
76 Query string parameters:
77 C<error_trace>,
78 C<filter_path>,
79 C<human>
80
81 See the L<CCR pause follow docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html>
82 for more information.
83
84 =head2 C<resume_follow()>
85
86 $response = $es->ccr->resume_follow(
87 index => $index, # required
88 )
89
90 The C<resume_follow()> method resumes following of an index.
91
92 Query string parameters:
93 C<error_trace>,
94 C<filter_path>,
95 C<human>
96
97 See the L<CCR resume follow docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html>
98 for more information.
99
100 =head2 C<unfollow()>
101
102 $response = $es->ccr->unfollow(
103 index => $index, # required
104 )
105
106 The C<unfollow()> method converts a follower index into a normal index.
107
108 Query string parameters:
109 C<error_trace>,
110 C<filter_path>,
111 C<human>
112
113 See the L<CCR unfollow docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html>
114 for more information.
115
116 =head2 C<forget_follower()>
117
118 $response = $es->ccr->forget_follower(
119 index => $index, # required
120 )
121
122 The C<forget_follower()> method removes the follower retention leases from the leader.
123
124 Query string parameters:
125 C<error_trace>,
126 C<filter_path>,
127 C<human>
128
129 See the L<CCR forget_follower docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html>
130 for more information.
131
132 =head1 STATS METHODS
133
134 =head2 C<stats()>
135
136 $response = $es->ccr->stats()
137
138 The C<stats()> method returns all stats related to cross-cluster replication.
139
140 Query string parameters:
141 C<error_trace>,
142 C<filter_path>,
143 C<human>
144
145 See the L<CCR stats docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html>
146 for more information.
147
148 =head2 C<follow_stats()>
149
150 $response = $es->ccr->follow_stats(
151 index => $index | \@indices, # optional
152 )
153
154 The C<follow_stats()> method returns shard-level stats about follower indices.
155
156 Query string parameters:
157 C<error_trace>,
158 C<filter_path>,
159 C<human>
160
161 See the L<CCR follow stats docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html>
162 for more information.
163
164 =head2 C<follow_info()>
165
166 $response = $es->ccr->follow_info(
167 index => $index | \@indices, # optional
168 )
169
170 The C<follow_info()> method returns the parameters and the status for each follower index.
171
172 Query string parameters:
173 C<error_trace>,
174 C<filter_path>,
175 C<human>
176
177 See the L<CCR follow info docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html>
178 for more information.
179
180 =head1 AUTO-FOLLOW METHODS
181
182 =head2 C<put_auto_follow_pattern()>
183
184 $response = $es->ccr->put_auto_follow_pattern(
185 name => $name # required
186 )
187
188 The C<put_auto_follow_pattern()> method creates a new named collection of auto-follow patterns against the remote cluster specified in the request body.
189
190 Query string parameters:
191 C<error_trace>,
192 C<filter_path>,
193 C<human>
194
195 See the L<CCR put auto follow pattern docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html>
196 for more information.
197
198 =head2 C<get_auto_follow_pattern()>
199
200 $response = $es->ccr->get_auto_follow_pattern(
201 name => $name # optional
202 )
203
204 The C<get_auto_follow_pattern()> method retrieves a named collection of auto-follow patterns, or all patterns.
205
206 Query string parameters:
207 C<error_trace>,
208 C<filter_path>,
209 C<human>
210
211 See the L<CCR get auto follow pattern docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html>
212 for more information.
213
214 =head2 C<delete_auto_follow_pattern()>
215
216 $response = $es->ccr->delete_auto_follow_pattern(
217 name => $name # required
218 )
219
220 The C<delete_auto_follow_pattern()> method deletes a named collection of auto-follow patterns.
221
222 Query string parameters:
223 C<error_trace>,
224 C<filter_path>,
225 C<human>
226
227 See the L<CCR delete auto follow pattern docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html>
228 for more information.
229
230 =head1 AUTHOR
231
232 Enrico Zimuel <[email protected]>
233
234 =head1 COPYRIGHT AND LICENSE
235
236 This software is Copyright (c) 2024 by Elasticsearch BV.
237
238 This is free software, licensed under:
239
240 The Apache License, Version 2.0, January 2004
241
242 =cut
243
244 __END__
245
246 # ABSTRACT: Plugin providing cross-cluster replication APIs for Search::Elasticsearch 8.x
247