2_0/Direct/Snapshot.pm untested

filter: Statementstmt 0.0% 0 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 10 CC 1 SCAR 6.9
CC
1
Cov
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::2_0::Direct::Snapshot;
6 $Search::Elasticsearch::Client::2_0::Direct::Snapshot::VERSION = '7.30_1'; # TRIAL
7  
8 $Search::Elasticsearch::Client::2_0::Direct::Snapshot::VERSION = '7.301';
9 use Moo;
10 with 'Search::Elasticsearch::Client::2_0::Role::API';
11 with 'Search::Elasticsearch::Role::Client::Direct';
12 __PACKAGE__->_install_api('snapshot');
13  
14 1;
15  
16 =pod
17  
18 =encoding UTF-8
19  
20 =head1 NAME
21  
22 Search::Elasticsearch::Client::2_0::Direct::Snapshot - A client for managing snapshot/restore
23  
24 =head1 VERSION
25  
26 version 7.30_1
27  
28 =head1 DESCRIPTION
29  
30 This module provides methods to manage snapshot/restore, or backups.
31 It can create, get and delete configured backup repositories, and
32 create, get, delete and restore snapshots of your cluster or indices.
33  
34 It does L<Search::Elasticsearch::Role::Client::Direct>.
35  
36 =head1 METHODS
37  
38 =head2 C<create_repository()>
39  
40 $e->snapshot->create_repository(
41 repository => 'repository', # required
42 body => { defn } # required
43 );
44  
45 Create a repository for backups.
46  
47 Query string parameters:
48 C<master_timeout>,
49 C<timeout>,
50 C<verify>
51  
52 See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html>
53 for more information.
54  
55 =head2 C<get_repository()>
56  
57 $e->snapshot->get_repository(
58 repository => 'repository' | \@repositories # optional
59 );
60  
61 Retrieve existing repositories.
62  
63 Query string parameters:
64 C<local>,
65 C<master_timeout>
66  
67 See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html>
68 for more information.
69  
70 =head2 C<verify_repository()>
71  
72 $e->snapshot->verify_repository(
73 repository => 'repository' # required
74 );
75  
76 Verify existing repository.
77  
78 Query string parameters:
79 C<master_timeout>,
80 C<timeout>
81  
82 See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html>
83 for more information.
84  
85 =head2 C<delete_repository()>
86  
87 $e->snapshot->delete_repository(
88 repository => 'repository' | \@repositories # required
89 );
90  
91 Delete repositories by name.
92  
93 Query string parameters:
94 C<master_timeout>,
95 C<timeout>
96  
97 See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html>
98 for more information.
99  
100 =head2 C<create()>
101  
102 $e->snapshot->create(
103 repository => 'repository', # required
104 snapshot => 'snapshot', # required,
105  
106 body => { snapshot defn } # optional
107 );
108  
109 Create a snapshot of the whole cluster or individual indices in the named
110 repository.
111  
112 Query string parameters:
113 C<master_timeout>,
114 C<wait_for_completion>
115  
116 =head2 C<get()>
117  
118 $e->snapshot->get(
119 repository => 'repository' # required
120 snapshot => 'snapshot' | \@snapshots # required
121 );
122  
123 Retrieve snapshots in the named repository.
124  
125 Query string parameters:
126 C<master_timeout>
127  
128 See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html>
129 for more information.
130  
131 =head2 C<delete()>
132  
133 $e->snapshot->delete(
134 repository => 'repository', # required
135 snapshot => 'snapshot' # required
136 );
137  
138 Delete snapshot in the named repository.
139  
140 Query string parameters:
141 C<master_timeout>
142  
143 See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html>
144 for more information.
145  
146 =head2 C<restore()>
147  
148 $e->snapshot->restore(
149 repository => 'repository', # required
150 snapshot => 'snapshot' # required
151  
152 body => { what to restore } # optional
153 );
154  
155 Restore a named snapshot.
156  
157 Query string parameters:
158 C<master_timeout>,
159 C<wait_for_completion>
160  
161 See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html>
162 for more information.
163  
164 =head2 C<status()>
165  
166 $result = $e->snapshot->status(
167 repository => 'repository', # optional
168 snapshot => 'snapshot' | \@snapshots # optional
169 );
170  
171 Returns status information about the specified snapshots.
172  
173 Query string parameters:
174 C<master_timeout>
175  
176 See the L<"snapshot/restore docs"|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshot.html>
177 for more information.
178  
179 =head1 AUTHOR
180  
181 Enrico Zimuel <enrico.zimuel@elastic.co>
182  
183 =head1 COPYRIGHT AND LICENSE
184  
185 This software is Copyright (c) 2020 by Elasticsearch BV.
186  
187 This is free software, licensed under:
188  
189 The Apache License, Version 2.0, January 2004
190  
191 =cut
192  
193 __END__