File Coverage

blib/lib/Paws/SMS.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Paws::SMS;
2 1     1   6831 use Moose;
  1         3  
  1         10  
3             sub service { 'sms' }
4             sub version { '2016-10-24' }
5             sub target_prefix { 'AWSServerMigrationService_V2016_10_24' }
6             sub json_version { "1.1" }
7             has max_attempts => (is => 'ro', isa => 'Int', default => 5);
8             has retry => (is => 'ro', isa => 'HashRef', default => sub {
9             { base => 'rand', type => 'exponential', growth_factor => 2 }
10             });
11             has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
12             ] });
13              
14             with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller', 'Paws::Net::JsonResponse';
15              
16            
17             sub CreateReplicationJob {
18             my $self = shift;
19             my $call_object = $self->new_with_coercions('Paws::SMS::CreateReplicationJob', @_);
20             return $self->caller->do_call($self, $call_object);
21             }
22             sub DeleteReplicationJob {
23             my $self = shift;
24             my $call_object = $self->new_with_coercions('Paws::SMS::DeleteReplicationJob', @_);
25             return $self->caller->do_call($self, $call_object);
26             }
27             sub DeleteServerCatalog {
28             my $self = shift;
29             my $call_object = $self->new_with_coercions('Paws::SMS::DeleteServerCatalog', @_);
30             return $self->caller->do_call($self, $call_object);
31             }
32             sub DisassociateConnector {
33             my $self = shift;
34             my $call_object = $self->new_with_coercions('Paws::SMS::DisassociateConnector', @_);
35             return $self->caller->do_call($self, $call_object);
36             }
37             sub GetConnectors {
38             my $self = shift;
39             my $call_object = $self->new_with_coercions('Paws::SMS::GetConnectors', @_);
40             return $self->caller->do_call($self, $call_object);
41             }
42             sub GetReplicationJobs {
43             my $self = shift;
44             my $call_object = $self->new_with_coercions('Paws::SMS::GetReplicationJobs', @_);
45             return $self->caller->do_call($self, $call_object);
46             }
47             sub GetReplicationRuns {
48             my $self = shift;
49             my $call_object = $self->new_with_coercions('Paws::SMS::GetReplicationRuns', @_);
50             return $self->caller->do_call($self, $call_object);
51             }
52             sub GetServers {
53             my $self = shift;
54             my $call_object = $self->new_with_coercions('Paws::SMS::GetServers', @_);
55             return $self->caller->do_call($self, $call_object);
56             }
57             sub ImportServerCatalog {
58             my $self = shift;
59             my $call_object = $self->new_with_coercions('Paws::SMS::ImportServerCatalog', @_);
60             return $self->caller->do_call($self, $call_object);
61             }
62             sub StartOnDemandReplicationRun {
63             my $self = shift;
64             my $call_object = $self->new_with_coercions('Paws::SMS::StartOnDemandReplicationRun', @_);
65             return $self->caller->do_call($self, $call_object);
66             }
67             sub UpdateReplicationJob {
68             my $self = shift;
69             my $call_object = $self->new_with_coercions('Paws::SMS::UpdateReplicationJob', @_);
70             return $self->caller->do_call($self, $call_object);
71             }
72            
73             sub GetAllConnectors {
74             my $self = shift;
75              
76             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
77             my $result = $self->GetConnectors(@_);
78             my $next_result = $result;
79              
80             if (not defined $callback) {
81             while ($next_result->nextToken) {
82             $next_result = $self->GetConnectors(@_, nextToken => $next_result->nextToken);
83             push @{ $result->connectorList }, @{ $next_result->connectorList };
84             }
85             return $result;
86             } else {
87             while ($result->nextToken) {
88             $callback->($_ => 'connectorList') foreach (@{ $result->connectorList });
89             $result = $self->GetConnectors(@_, nextToken => $result->nextToken);
90             }
91             $callback->($_ => 'connectorList') foreach (@{ $result->connectorList });
92             }
93              
94             return undef
95             }
96             sub GetAllReplicationJobs {
97             my $self = shift;
98              
99             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
100             my $result = $self->GetReplicationJobs(@_);
101             my $next_result = $result;
102              
103             if (not defined $callback) {
104             while ($next_result->nextToken) {
105             $next_result = $self->GetReplicationJobs(@_, nextToken => $next_result->nextToken);
106             push @{ $result->replicationJobList }, @{ $next_result->replicationJobList };
107             }
108             return $result;
109             } else {
110             while ($result->nextToken) {
111             $callback->($_ => 'replicationJobList') foreach (@{ $result->replicationJobList });
112             $result = $self->GetReplicationJobs(@_, nextToken => $result->nextToken);
113             }
114             $callback->($_ => 'replicationJobList') foreach (@{ $result->replicationJobList });
115             }
116              
117             return undef
118             }
119             sub GetAllReplicationRuns {
120             my $self = shift;
121              
122             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
123             my $result = $self->GetReplicationRuns(@_);
124             my $next_result = $result;
125              
126             if (not defined $callback) {
127             while ($next_result->nextToken) {
128             $next_result = $self->GetReplicationRuns(@_, nextToken => $next_result->nextToken);
129             push @{ $result->replicationRunList }, @{ $next_result->replicationRunList };
130             }
131             return $result;
132             } else {
133             while ($result->nextToken) {
134             $callback->($_ => 'replicationRunList') foreach (@{ $result->replicationRunList });
135             $result = $self->GetReplicationRuns(@_, nextToken => $result->nextToken);
136             }
137             $callback->($_ => 'replicationRunList') foreach (@{ $result->replicationRunList });
138             }
139              
140             return undef
141             }
142             sub GetAllServers {
143             my $self = shift;
144              
145             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
146             my $result = $self->GetServers(@_);
147             my $next_result = $result;
148              
149             if (not defined $callback) {
150             while ($next_result->nextToken) {
151             $next_result = $self->GetServers(@_, nextToken => $next_result->nextToken);
152             push @{ $result->serverList }, @{ $next_result->serverList };
153             }
154             return $result;
155             } else {
156             while ($result->nextToken) {
157             $callback->($_ => 'serverList') foreach (@{ $result->serverList });
158             $result = $self->GetServers(@_, nextToken => $result->nextToken);
159             }
160             $callback->($_ => 'serverList') foreach (@{ $result->serverList });
161             }
162              
163             return undef
164             }
165              
166              
167             sub operations { qw/CreateReplicationJob DeleteReplicationJob DeleteServerCatalog DisassociateConnector GetConnectors GetReplicationJobs GetReplicationRuns GetServers ImportServerCatalog StartOnDemandReplicationRun UpdateReplicationJob / }
168              
169             1;
170              
171             ### main pod documentation begin ###
172              
173             =head1 NAME
174              
175             Paws::SMS - Perl Interface to AWS AWS Server Migration Service
176              
177             =head1 SYNOPSIS
178              
179             use Paws;
180              
181             my $obj = Paws->service('SMS');
182             my $res = $obj->Method(
183             Arg1 => $val1,
184             Arg2 => [ 'V1', 'V2' ],
185             # if Arg3 is an object, the HashRef will be used as arguments to the constructor
186             # of the arguments type
187             Arg3 => { Att1 => 'Val1' },
188             # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
189             # the constructor of the arguments type
190             Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
191             );
192              
193             =head1 DESCRIPTION
194              
195             Amazon Server Migration Service automates the process of migrating
196             servers to EC2.
197              
198             =head1 METHODS
199              
200             =head2 CreateReplicationJob(Frequency => Int, SeedReplicationTime => Str, ServerId => Str, [Description => Str, LicenseType => Str, RoleName => Str])
201              
202             Each argument is described in detail in: L<Paws::SMS::CreateReplicationJob>
203              
204             Returns: a L<Paws::SMS::CreateReplicationJobResponse> instance
205              
206             The CreateReplicationJob API is used to create a ReplicationJob to
207             replicate a server on AWS. Call this API to first create a
208             ReplicationJob, which will then schedule periodic ReplicationRuns to
209             replicate your server to AWS. Each ReplicationRun will result in the
210             creation of an AWS AMI.
211              
212              
213             =head2 DeleteReplicationJob(ReplicationJobId => Str)
214              
215             Each argument is described in detail in: L<Paws::SMS::DeleteReplicationJob>
216              
217             Returns: a L<Paws::SMS::DeleteReplicationJobResponse> instance
218              
219             The DeleteReplicationJob API is used to delete a ReplicationJob,
220             resulting in no further ReplicationRuns. This will delete the contents
221             of the S3 bucket used to store SMS artifacts, but will not delete any
222             AMIs created by the SMS service.
223              
224              
225             =head2 DeleteServerCatalog()
226              
227             Each argument is described in detail in: L<Paws::SMS::DeleteServerCatalog>
228              
229             Returns: a L<Paws::SMS::DeleteServerCatalogResponse> instance
230              
231             The DeleteServerCatalog API clears all servers from your server
232             catalog. This means that these servers will no longer be accessible to
233             the Server Migration Service.
234              
235              
236             =head2 DisassociateConnector(ConnectorId => Str)
237              
238             Each argument is described in detail in: L<Paws::SMS::DisassociateConnector>
239              
240             Returns: a L<Paws::SMS::DisassociateConnectorResponse> instance
241              
242             The DisassociateConnector API will disassociate a connector from the
243             Server Migration Service, rendering it unavailable to support
244             replication jobs.
245              
246              
247             =head2 GetConnectors([MaxResults => Int, NextToken => Str])
248              
249             Each argument is described in detail in: L<Paws::SMS::GetConnectors>
250              
251             Returns: a L<Paws::SMS::GetConnectorsResponse> instance
252              
253             The GetConnectors API returns a list of connectors that are registered
254             with the Server Migration Service.
255              
256              
257             =head2 GetReplicationJobs([MaxResults => Int, NextToken => Str, ReplicationJobId => Str])
258              
259             Each argument is described in detail in: L<Paws::SMS::GetReplicationJobs>
260              
261             Returns: a L<Paws::SMS::GetReplicationJobsResponse> instance
262              
263             The GetReplicationJobs API will return all of your ReplicationJobs and
264             their details. This API returns a paginated list, that may be
265             consecutively called with nextToken to retrieve all ReplicationJobs.
266              
267              
268             =head2 GetReplicationRuns(ReplicationJobId => Str, [MaxResults => Int, NextToken => Str])
269              
270             Each argument is described in detail in: L<Paws::SMS::GetReplicationRuns>
271              
272             Returns: a L<Paws::SMS::GetReplicationRunsResponse> instance
273              
274             The GetReplicationRuns API will return all ReplicationRuns for a given
275             ReplicationJob. This API returns a paginated list, that may be
276             consecutively called with nextToken to retrieve all ReplicationRuns for
277             a ReplicationJob.
278              
279              
280             =head2 GetServers([MaxResults => Int, NextToken => Str])
281              
282             Each argument is described in detail in: L<Paws::SMS::GetServers>
283              
284             Returns: a L<Paws::SMS::GetServersResponse> instance
285              
286             The GetServers API returns a list of all servers in your server
287             catalog. For this call to succeed, you must previously have called
288             ImportServerCatalog.
289              
290              
291             =head2 ImportServerCatalog()
292              
293             Each argument is described in detail in: L<Paws::SMS::ImportServerCatalog>
294              
295             Returns: a L<Paws::SMS::ImportServerCatalogResponse> instance
296              
297             The ImportServerCatalog API is used to gather the complete list of
298             on-premises servers on your premises. This API call requires connectors
299             to be installed and monitoring all servers you would like imported.
300             This API call returns immediately, but may take some time to retrieve
301             all of the servers.
302              
303              
304             =head2 StartOnDemandReplicationRun(ReplicationJobId => Str, [Description => Str])
305              
306             Each argument is described in detail in: L<Paws::SMS::StartOnDemandReplicationRun>
307              
308             Returns: a L<Paws::SMS::StartOnDemandReplicationRunResponse> instance
309              
310             The StartOnDemandReplicationRun API is used to start a ReplicationRun
311             on demand (in addition to those that are scheduled based on your
312             frequency). This ReplicationRun will start immediately.
313             StartOnDemandReplicationRun is subject to limits on how many on demand
314             ReplicationRuns you may call per 24-hour period.
315              
316              
317             =head2 UpdateReplicationJob(ReplicationJobId => Str, [Description => Str, Frequency => Int, LicenseType => Str, NextReplicationRunStartTime => Str, RoleName => Str])
318              
319             Each argument is described in detail in: L<Paws::SMS::UpdateReplicationJob>
320              
321             Returns: a L<Paws::SMS::UpdateReplicationJobResponse> instance
322              
323             The UpdateReplicationJob API is used to change the settings of your
324             existing ReplicationJob created using CreateReplicationJob. Calling
325             this API will affect the next scheduled ReplicationRun.
326              
327              
328              
329              
330             =head1 PAGINATORS
331              
332             Paginator methods are helpers that repetively call methods that return partial results
333              
334             =head2 GetAllConnectors(sub { },[MaxResults => Int, NextToken => Str])
335              
336             =head2 GetAllConnectors([MaxResults => Int, NextToken => Str])
337              
338              
339             If passed a sub as first parameter, it will call the sub for each element found in :
340              
341             - connectorList, passing the object as the first parameter, and the string 'connectorList' as the second parameter
342              
343             If not, it will return a a L<Paws::SMS::GetConnectorsResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
344              
345              
346             =head2 GetAllReplicationJobs(sub { },[MaxResults => Int, NextToken => Str, ReplicationJobId => Str])
347              
348             =head2 GetAllReplicationJobs([MaxResults => Int, NextToken => Str, ReplicationJobId => Str])
349              
350              
351             If passed a sub as first parameter, it will call the sub for each element found in :
352              
353             - replicationJobList, passing the object as the first parameter, and the string 'replicationJobList' as the second parameter
354              
355             If not, it will return a a L<Paws::SMS::GetReplicationJobsResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
356              
357              
358             =head2 GetAllReplicationRuns(sub { },ReplicationJobId => Str, [MaxResults => Int, NextToken => Str])
359              
360             =head2 GetAllReplicationRuns(ReplicationJobId => Str, [MaxResults => Int, NextToken => Str])
361              
362              
363             If passed a sub as first parameter, it will call the sub for each element found in :
364              
365             - replicationRunList, passing the object as the first parameter, and the string 'replicationRunList' as the second parameter
366              
367             If not, it will return a a L<Paws::SMS::GetReplicationRunsResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
368              
369              
370             =head2 GetAllServers(sub { },[MaxResults => Int, NextToken => Str])
371              
372             =head2 GetAllServers([MaxResults => Int, NextToken => Str])
373              
374              
375             If passed a sub as first parameter, it will call the sub for each element found in :
376              
377             - serverList, passing the object as the first parameter, and the string 'serverList' as the second parameter
378              
379             If not, it will return a a L<Paws::SMS::GetServersResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
380              
381              
382              
383              
384              
385             =head1 SEE ALSO
386              
387             This service class forms part of L<Paws>
388              
389             =head1 BUGS and CONTRIBUTIONS
390              
391             The source code is located here: https://github.com/pplu/aws-sdk-perl
392              
393             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
394              
395             =cut
396