blib/lib/Paws/MediaPackage.pm untested

filter: Statementstmt 0.0% 0 / 130 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 28 Podpod 0.0% 0 / 27 totaltotal 0.0% 0 / 197 CC 7 SCAR 15.4
CC
7
Cov
0%
ListAllChannels
12.0
ListAllHarvestJobs
12.0
ListAllOriginEndpoints
12.0
CRAP 4.6
1 package Paws::MediaPackage;
2 use Moose;
3 sub service { 'mediapackage' }
4 sub signing_name { 'mediapackage' }
5 sub version { '2017-10-12' }
6 sub flattened_arrays { 0 }
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::RestJsonCaller';
15  
16
17 sub ConfigureLogs {
18 my $self = shift;
19 my $call_object = $self->new_with_coercions('Paws::MediaPackage::ConfigureLogs', @_);
20 return $self->caller->do_call($self, $call_object);
21 }
22 sub CreateChannel {
23 my $self = shift;
24 my $call_object = $self->new_with_coercions('Paws::MediaPackage::CreateChannel', @_);
25 return $self->caller->do_call($self, $call_object);
26 }
27 sub CreateHarvestJob {
28 my $self = shift;
29 my $call_object = $self->new_with_coercions('Paws::MediaPackage::CreateHarvestJob', @_);
30 return $self->caller->do_call($self, $call_object);
31 }
32 sub CreateOriginEndpoint {
33 my $self = shift;
34 my $call_object = $self->new_with_coercions('Paws::MediaPackage::CreateOriginEndpoint', @_);
35 return $self->caller->do_call($self, $call_object);
36 }
37 sub DeleteChannel {
38 my $self = shift;
39 my $call_object = $self->new_with_coercions('Paws::MediaPackage::DeleteChannel', @_);
40 return $self->caller->do_call($self, $call_object);
41 }
42 sub DeleteOriginEndpoint {
43 my $self = shift;
44 my $call_object = $self->new_with_coercions('Paws::MediaPackage::DeleteOriginEndpoint', @_);
45 return $self->caller->do_call($self, $call_object);
46 }
47 sub DescribeChannel {
48 my $self = shift;
49 my $call_object = $self->new_with_coercions('Paws::MediaPackage::DescribeChannel', @_);
50 return $self->caller->do_call($self, $call_object);
51 }
52 sub DescribeHarvestJob {
53 my $self = shift;
54 my $call_object = $self->new_with_coercions('Paws::MediaPackage::DescribeHarvestJob', @_);
55 return $self->caller->do_call($self, $call_object);
56 }
57 sub DescribeOriginEndpoint {
58 my $self = shift;
59 my $call_object = $self->new_with_coercions('Paws::MediaPackage::DescribeOriginEndpoint', @_);
60 return $self->caller->do_call($self, $call_object);
61 }
62 sub ListChannels {
63 my $self = shift;
64 my $call_object = $self->new_with_coercions('Paws::MediaPackage::ListChannels', @_);
65 return $self->caller->do_call($self, $call_object);
66 }
67 sub ListHarvestJobs {
68 my $self = shift;
69 my $call_object = $self->new_with_coercions('Paws::MediaPackage::ListHarvestJobs', @_);
70 return $self->caller->do_call($self, $call_object);
71 }
72 sub ListOriginEndpoints {
73 my $self = shift;
74 my $call_object = $self->new_with_coercions('Paws::MediaPackage::ListOriginEndpoints', @_);
75 return $self->caller->do_call($self, $call_object);
76 }
77 sub ListTagsForResource {
78 my $self = shift;
79 my $call_object = $self->new_with_coercions('Paws::MediaPackage::ListTagsForResource', @_);
80 return $self->caller->do_call($self, $call_object);
81 }
82 sub RotateChannelCredentials {
83 my $self = shift;
84 my $call_object = $self->new_with_coercions('Paws::MediaPackage::RotateChannelCredentials', @_);
85 return $self->caller->do_call($self, $call_object);
86 }
87 sub RotateIngestEndpointCredentials {
88 my $self = shift;
89 my $call_object = $self->new_with_coercions('Paws::MediaPackage::RotateIngestEndpointCredentials', @_);
90 return $self->caller->do_call($self, $call_object);
91 }
92 sub TagResource {
93 my $self = shift;
94 my $call_object = $self->new_with_coercions('Paws::MediaPackage::TagResource', @_);
95 return $self->caller->do_call($self, $call_object);
96 }
97 sub UntagResource {
98 my $self = shift;
99 my $call_object = $self->new_with_coercions('Paws::MediaPackage::UntagResource', @_);
100 return $self->caller->do_call($self, $call_object);
101 }
102 sub UpdateChannel {
103 my $self = shift;
104 my $call_object = $self->new_with_coercions('Paws::MediaPackage::UpdateChannel', @_);
105 return $self->caller->do_call($self, $call_object);
106 }
107 sub UpdateOriginEndpoint {
108 my $self = shift;
109 my $call_object = $self->new_with_coercions('Paws::MediaPackage::UpdateOriginEndpoint', @_);
110 return $self->caller->do_call($self, $call_object);
111 }
112
113 sub ListAllChannels {
114 my $self = shift;
115  
116 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
117 my $result = $self->ListChannels(@_);
118 my $next_result = $result;
119  
120 if (not defined $callback) {
121 while ($next_result->NextToken) {
122 $next_result = $self->ListChannels(@_, NextToken => $next_result->NextToken);
123 push @{ $result->Channels }, @{ $next_result->Channels };
124 }
125 return $result;
126 } else {
127 while ($result->NextToken) {
128 $callback->($_ => 'Channels') foreach (@{ $result->Channels });
129 $result = $self->ListChannels(@_, NextToken => $result->NextToken);
130 }
131 $callback->($_ => 'Channels') foreach (@{ $result->Channels });
132 }
133  
134 return undef
135 }
136 sub ListAllHarvestJobs {
137 my $self = shift;
138  
139 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
140 my $result = $self->ListHarvestJobs(@_);
141 my $next_result = $result;
142  
143 if (not defined $callback) {
144 while ($next_result->NextToken) {
145 $next_result = $self->ListHarvestJobs(@_, NextToken => $next_result->NextToken);
146 push @{ $result->HarvestJobs }, @{ $next_result->HarvestJobs };
147 }
148 return $result;
149 } else {
150 while ($result->NextToken) {
151 $callback->($_ => 'HarvestJobs') foreach (@{ $result->HarvestJobs });
152 $result = $self->ListHarvestJobs(@_, NextToken => $result->NextToken);
153 }
154 $callback->($_ => 'HarvestJobs') foreach (@{ $result->HarvestJobs });
155 }
156  
157 return undef
158 }
159 sub ListAllOriginEndpoints {
160 my $self = shift;
161  
162 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
163 my $result = $self->ListOriginEndpoints(@_);
164 my $next_result = $result;
165  
166 if (not defined $callback) {
167 while ($next_result->NextToken) {
168 $next_result = $self->ListOriginEndpoints(@_, NextToken => $next_result->NextToken);
169 push @{ $result->OriginEndpoints }, @{ $next_result->OriginEndpoints };
170 }
171 return $result;
172 } else {
173 while ($result->NextToken) {
174 $callback->($_ => 'OriginEndpoints') foreach (@{ $result->OriginEndpoints });
175 $result = $self->ListOriginEndpoints(@_, NextToken => $result->NextToken);
176 }
177 $callback->($_ => 'OriginEndpoints') foreach (@{ $result->OriginEndpoints });
178 }
179  
180 return undef
181 }
182  
183  
184 sub operations { qw/ConfigureLogs CreateChannel CreateHarvestJob CreateOriginEndpoint DeleteChannel DeleteOriginEndpoint DescribeChannel DescribeHarvestJob DescribeOriginEndpoint ListChannels ListHarvestJobs ListOriginEndpoints ListTagsForResource RotateChannelCredentials RotateIngestEndpointCredentials TagResource UntagResource UpdateChannel UpdateOriginEndpoint / }
185  
186 1;
187  
188 ### main pod documentation begin ###
189  
190 =head1 NAME
191  
192 Paws::MediaPackage - Perl Interface to AWS AWS Elemental MediaPackage
193  
194 =head1 SYNOPSIS
195  
196 use Paws;
197  
198 my $obj = Paws->service('MediaPackage');
199 my $res = $obj->Method(
200 Arg1 => $val1,
201 Arg2 => [ 'V1', 'V2' ],
202 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
203 # of the arguments type
204 Arg3 => { Att1 => 'Val1' },
205 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
206 # the constructor of the arguments type
207 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
208 );
209  
210 =head1 DESCRIPTION
211  
212 AWS Elemental MediaPackage
213  
214 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12>
215  
216  
217 =head1 METHODS
218  
219 =head2 ConfigureLogs
220  
221 =over
222  
223 =item Id => Str
224  
225 =item [EgressAccessLogs => L<Paws::MediaPackage::EgressAccessLogs>]
226  
227 =item [IngressAccessLogs => L<Paws::MediaPackage::IngressAccessLogs>]
228  
229  
230 =back
231  
232 Each argument is described in detail in: L<Paws::MediaPackage::ConfigureLogs>
233  
234 Returns: a L<Paws::MediaPackage::ConfigureLogsResponse> instance
235  
236 Changes the Channel's properities to configure log subscription
237  
238  
239 =head2 CreateChannel
240  
241 =over
242  
243 =item Id => Str
244  
245 =item [Description => Str]
246  
247 =item [Tags => L<Paws::MediaPackage::Tags>]
248  
249  
250 =back
251  
252 Each argument is described in detail in: L<Paws::MediaPackage::CreateChannel>
253  
254 Returns: a L<Paws::MediaPackage::CreateChannelResponse> instance
255  
256 Creates a new Channel.
257  
258  
259 =head2 CreateHarvestJob
260  
261 =over
262  
263 =item EndTime => Str
264  
265 =item Id => Str
266  
267 =item OriginEndpointId => Str
268  
269 =item S3Destination => L<Paws::MediaPackage::S3Destination>
270  
271 =item StartTime => Str
272  
273  
274 =back
275  
276 Each argument is described in detail in: L<Paws::MediaPackage::CreateHarvestJob>
277  
278 Returns: a L<Paws::MediaPackage::CreateHarvestJobResponse> instance
279  
280 Creates a new HarvestJob record.
281  
282  
283 =head2 CreateOriginEndpoint
284  
285 =over
286  
287 =item ChannelId => Str
288  
289 =item Id => Str
290  
291 =item [Authorization => L<Paws::MediaPackage::Authorization>]
292  
293 =item [CmafPackage => L<Paws::MediaPackage::CmafPackageCreateOrUpdateParameters>]
294  
295 =item [DashPackage => L<Paws::MediaPackage::DashPackage>]
296  
297 =item [Description => Str]
298  
299 =item [HlsPackage => L<Paws::MediaPackage::HlsPackage>]
300  
301 =item [ManifestName => Str]
302  
303 =item [MssPackage => L<Paws::MediaPackage::MssPackage>]
304  
305 =item [Origination => Str]
306  
307 =item [StartoverWindowSeconds => Int]
308  
309 =item [Tags => L<Paws::MediaPackage::Tags>]
310  
311 =item [TimeDelaySeconds => Int]
312  
313 =item [Whitelist => ArrayRef[Str|Undef]]
314  
315  
316 =back
317  
318 Each argument is described in detail in: L<Paws::MediaPackage::CreateOriginEndpoint>
319  
320 Returns: a L<Paws::MediaPackage::CreateOriginEndpointResponse> instance
321  
322 Creates a new OriginEndpoint record.
323  
324  
325 =head2 DeleteChannel
326  
327 =over
328  
329 =item Id => Str
330  
331  
332 =back
333  
334 Each argument is described in detail in: L<Paws::MediaPackage::DeleteChannel>
335  
336 Returns: a L<Paws::MediaPackage::DeleteChannelResponse> instance
337  
338 Deletes an existing Channel.
339  
340  
341 =head2 DeleteOriginEndpoint
342  
343 =over
344  
345 =item Id => Str
346  
347  
348 =back
349  
350 Each argument is described in detail in: L<Paws::MediaPackage::DeleteOriginEndpoint>
351  
352 Returns: a L<Paws::MediaPackage::DeleteOriginEndpointResponse> instance
353  
354 Deletes an existing OriginEndpoint.
355  
356  
357 =head2 DescribeChannel
358  
359 =over
360  
361 =item Id => Str
362  
363  
364 =back
365  
366 Each argument is described in detail in: L<Paws::MediaPackage::DescribeChannel>
367  
368 Returns: a L<Paws::MediaPackage::DescribeChannelResponse> instance
369  
370 Gets details about a Channel.
371  
372  
373 =head2 DescribeHarvestJob
374  
375 =over
376  
377 =item Id => Str
378  
379  
380 =back
381  
382 Each argument is described in detail in: L<Paws::MediaPackage::DescribeHarvestJob>
383  
384 Returns: a L<Paws::MediaPackage::DescribeHarvestJobResponse> instance
385  
386 Gets details about an existing HarvestJob.
387  
388  
389 =head2 DescribeOriginEndpoint
390  
391 =over
392  
393 =item Id => Str
394  
395  
396 =back
397  
398 Each argument is described in detail in: L<Paws::MediaPackage::DescribeOriginEndpoint>
399  
400 Returns: a L<Paws::MediaPackage::DescribeOriginEndpointResponse> instance
401  
402 Gets details about an existing OriginEndpoint.
403  
404  
405 =head2 ListChannels
406  
407 =over
408  
409 =item [MaxResults => Int]
410  
411 =item [NextToken => Str]
412  
413  
414 =back
415  
416 Each argument is described in detail in: L<Paws::MediaPackage::ListChannels>
417  
418 Returns: a L<Paws::MediaPackage::ListChannelsResponse> instance
419  
420 Returns a collection of Channels.
421  
422  
423 =head2 ListHarvestJobs
424  
425 =over
426  
427 =item [IncludeChannelId => Str]
428  
429 =item [IncludeStatus => Str]
430  
431 =item [MaxResults => Int]
432  
433 =item [NextToken => Str]
434  
435  
436 =back
437  
438 Each argument is described in detail in: L<Paws::MediaPackage::ListHarvestJobs>
439  
440 Returns: a L<Paws::MediaPackage::ListHarvestJobsResponse> instance
441  
442 Returns a collection of HarvestJob records.
443  
444  
445 =head2 ListOriginEndpoints
446  
447 =over
448  
449 =item [ChannelId => Str]
450  
451 =item [MaxResults => Int]
452  
453 =item [NextToken => Str]
454  
455  
456 =back
457  
458 Each argument is described in detail in: L<Paws::MediaPackage::ListOriginEndpoints>
459  
460 Returns: a L<Paws::MediaPackage::ListOriginEndpointsResponse> instance
461  
462 Returns a collection of OriginEndpoint records.
463  
464  
465 =head2 ListTagsForResource
466  
467 =over
468  
469 =item ResourceArn => Str
470  
471  
472 =back
473  
474 Each argument is described in detail in: L<Paws::MediaPackage::ListTagsForResource>
475  
476 Returns: a L<Paws::MediaPackage::ListTagsForResourceResponse> instance
477  
478  
479  
480  
481 =head2 RotateChannelCredentials
482  
483 =over
484  
485 =item Id => Str
486  
487  
488 =back
489  
490 Each argument is described in detail in: L<Paws::MediaPackage::RotateChannelCredentials>
491  
492 Returns: a L<Paws::MediaPackage::RotateChannelCredentialsResponse> instance
493  
494 Changes the Channel's first IngestEndpoint's username and password.
495 WARNING - This API is deprecated. Please use
496 RotateIngestEndpointCredentials instead
497  
498  
499 =head2 RotateIngestEndpointCredentials
500  
501 =over
502  
503 =item Id => Str
504  
505 =item IngestEndpointId => Str
506  
507  
508 =back
509  
510 Each argument is described in detail in: L<Paws::MediaPackage::RotateIngestEndpointCredentials>
511  
512 Returns: a L<Paws::MediaPackage::RotateIngestEndpointCredentialsResponse> instance
513  
514 Rotate the IngestEndpoint's username and password, as specified by the
515 IngestEndpoint's id.
516  
517  
518 =head2 TagResource
519  
520 =over
521  
522 =item ResourceArn => Str
523  
524 =item Tags => L<Paws::MediaPackage::__mapOf__string>
525  
526  
527 =back
528  
529 Each argument is described in detail in: L<Paws::MediaPackage::TagResource>
530  
531 Returns: nothing
532  
533  
534  
535  
536 =head2 UntagResource
537  
538 =over
539  
540 =item ResourceArn => Str
541  
542 =item TagKeys => ArrayRef[Str|Undef]
543  
544  
545 =back
546  
547 Each argument is described in detail in: L<Paws::MediaPackage::UntagResource>
548  
549 Returns: nothing
550  
551  
552  
553  
554 =head2 UpdateChannel
555  
556 =over
557  
558 =item Id => Str
559  
560 =item [Description => Str]
561  
562  
563 =back
564  
565 Each argument is described in detail in: L<Paws::MediaPackage::UpdateChannel>
566  
567 Returns: a L<Paws::MediaPackage::UpdateChannelResponse> instance
568  
569 Updates an existing Channel.
570  
571  
572 =head2 UpdateOriginEndpoint
573  
574 =over
575  
576 =item Id => Str
577  
578 =item [Authorization => L<Paws::MediaPackage::Authorization>]
579  
580 =item [CmafPackage => L<Paws::MediaPackage::CmafPackageCreateOrUpdateParameters>]
581  
582 =item [DashPackage => L<Paws::MediaPackage::DashPackage>]
583  
584 =item [Description => Str]
585  
586 =item [HlsPackage => L<Paws::MediaPackage::HlsPackage>]
587  
588 =item [ManifestName => Str]
589  
590 =item [MssPackage => L<Paws::MediaPackage::MssPackage>]
591  
592 =item [Origination => Str]
593  
594 =item [StartoverWindowSeconds => Int]
595  
596 =item [TimeDelaySeconds => Int]
597  
598 =item [Whitelist => ArrayRef[Str|Undef]]
599  
600  
601 =back
602  
603 Each argument is described in detail in: L<Paws::MediaPackage::UpdateOriginEndpoint>
604  
605 Returns: a L<Paws::MediaPackage::UpdateOriginEndpointResponse> instance
606  
607 Updates an existing OriginEndpoint.
608  
609  
610  
611  
612 =head1 PAGINATORS
613  
614 Paginator methods are helpers that repetively call methods that return partial results
615  
616 =head2 ListAllChannels(sub { },[MaxResults => Int, NextToken => Str])
617  
618 =head2 ListAllChannels([MaxResults => Int, NextToken => Str])
619  
620  
621 If passed a sub as first parameter, it will call the sub for each element found in :
622  
623 - Channels, passing the object as the first parameter, and the string 'Channels' as the second parameter
624  
625 If not, it will return a a L<Paws::MediaPackage::ListChannelsResponse> 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.
626  
627  
628 =head2 ListAllHarvestJobs(sub { },[IncludeChannelId => Str, IncludeStatus => Str, MaxResults => Int, NextToken => Str])
629  
630 =head2 ListAllHarvestJobs([IncludeChannelId => Str, IncludeStatus => Str, MaxResults => Int, NextToken => Str])
631  
632  
633 If passed a sub as first parameter, it will call the sub for each element found in :
634  
635 - HarvestJobs, passing the object as the first parameter, and the string 'HarvestJobs' as the second parameter
636  
637 If not, it will return a a L<Paws::MediaPackage::ListHarvestJobsResponse> 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.
638  
639  
640 =head2 ListAllOriginEndpoints(sub { },[ChannelId => Str, MaxResults => Int, NextToken => Str])
641  
642 =head2 ListAllOriginEndpoints([ChannelId => Str, MaxResults => Int, NextToken => Str])
643  
644  
645 If passed a sub as first parameter, it will call the sub for each element found in :
646  
647 - OriginEndpoints, passing the object as the first parameter, and the string 'OriginEndpoints' as the second parameter
648  
649 If not, it will return a a L<Paws::MediaPackage::ListOriginEndpointsResponse> 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.
650  
651  
652  
653  
654  
655 =head1 SEE ALSO
656  
657 This service class forms part of L<Paws>
658  
659 =head1 BUGS and CONTRIBUTIONS
660  
661 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
662  
663 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
664  
665 =cut
666