blib/lib/Paws/MediaStore.pm untested

filter: Statementstmt 0.0% 0 / 98 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 29 Podpod 0.0% 0 / 28 totaltotal 0.0% 0 / 159 CC 3 SCAR 10.9
CC
3
Cov
0%
ListAllContainers
12.0
service
2.0
signing_name
2.0
CRAP 3.0
1 package Paws::MediaStore;
2 use Moose;
3 sub service { 'mediastore' }
4 sub signing_name { 'mediastore' }
5 sub version { '2017-09-01' }
6 sub target_prefix { 'MediaStore_20170901' }
7 sub json_version { "1.1" }
8 has max_attempts => (is => 'ro', isa => 'Int', default => 5);
9 has retry => (is => 'ro', isa => 'HashRef', default => sub {
10 { base => 'rand', type => 'exponential', growth_factor => 2 }
11 });
12 has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
13 ] });
14  
15 with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller';
16  
17
18 sub CreateContainer {
19 my $self = shift;
20 my $call_object = $self->new_with_coercions('Paws::MediaStore::CreateContainer', @_);
21 return $self->caller->do_call($self, $call_object);
22 }
23 sub DeleteContainer {
24 my $self = shift;
25 my $call_object = $self->new_with_coercions('Paws::MediaStore::DeleteContainer', @_);
26 return $self->caller->do_call($self, $call_object);
27 }
28 sub DeleteContainerPolicy {
29 my $self = shift;
30 my $call_object = $self->new_with_coercions('Paws::MediaStore::DeleteContainerPolicy', @_);
31 return $self->caller->do_call($self, $call_object);
32 }
33 sub DeleteCorsPolicy {
34 my $self = shift;
35 my $call_object = $self->new_with_coercions('Paws::MediaStore::DeleteCorsPolicy', @_);
36 return $self->caller->do_call($self, $call_object);
37 }
38 sub DeleteLifecyclePolicy {
39 my $self = shift;
40 my $call_object = $self->new_with_coercions('Paws::MediaStore::DeleteLifecyclePolicy', @_);
41 return $self->caller->do_call($self, $call_object);
42 }
43 sub DeleteMetricPolicy {
44 my $self = shift;
45 my $call_object = $self->new_with_coercions('Paws::MediaStore::DeleteMetricPolicy', @_);
46 return $self->caller->do_call($self, $call_object);
47 }
48 sub DescribeContainer {
49 my $self = shift;
50 my $call_object = $self->new_with_coercions('Paws::MediaStore::DescribeContainer', @_);
51 return $self->caller->do_call($self, $call_object);
52 }
53 sub GetContainerPolicy {
54 my $self = shift;
55 my $call_object = $self->new_with_coercions('Paws::MediaStore::GetContainerPolicy', @_);
56 return $self->caller->do_call($self, $call_object);
57 }
58 sub GetCorsPolicy {
59 my $self = shift;
60 my $call_object = $self->new_with_coercions('Paws::MediaStore::GetCorsPolicy', @_);
61 return $self->caller->do_call($self, $call_object);
62 }
63 sub GetLifecyclePolicy {
64 my $self = shift;
65 my $call_object = $self->new_with_coercions('Paws::MediaStore::GetLifecyclePolicy', @_);
66 return $self->caller->do_call($self, $call_object);
67 }
68 sub GetMetricPolicy {
69 my $self = shift;
70 my $call_object = $self->new_with_coercions('Paws::MediaStore::GetMetricPolicy', @_);
71 return $self->caller->do_call($self, $call_object);
72 }
73 sub ListContainers {
74 my $self = shift;
75 my $call_object = $self->new_with_coercions('Paws::MediaStore::ListContainers', @_);
76 return $self->caller->do_call($self, $call_object);
77 }
78 sub ListTagsForResource {
79 my $self = shift;
80 my $call_object = $self->new_with_coercions('Paws::MediaStore::ListTagsForResource', @_);
81 return $self->caller->do_call($self, $call_object);
82 }
83 sub PutContainerPolicy {
84 my $self = shift;
85 my $call_object = $self->new_with_coercions('Paws::MediaStore::PutContainerPolicy', @_);
86 return $self->caller->do_call($self, $call_object);
87 }
88 sub PutCorsPolicy {
89 my $self = shift;
90 my $call_object = $self->new_with_coercions('Paws::MediaStore::PutCorsPolicy', @_);
91 return $self->caller->do_call($self, $call_object);
92 }
93 sub PutLifecyclePolicy {
94 my $self = shift;
95 my $call_object = $self->new_with_coercions('Paws::MediaStore::PutLifecyclePolicy', @_);
96 return $self->caller->do_call($self, $call_object);
97 }
98 sub PutMetricPolicy {
99 my $self = shift;
100 my $call_object = $self->new_with_coercions('Paws::MediaStore::PutMetricPolicy', @_);
101 return $self->caller->do_call($self, $call_object);
102 }
103 sub StartAccessLogging {
104 my $self = shift;
105 my $call_object = $self->new_with_coercions('Paws::MediaStore::StartAccessLogging', @_);
106 return $self->caller->do_call($self, $call_object);
107 }
108 sub StopAccessLogging {
109 my $self = shift;
110 my $call_object = $self->new_with_coercions('Paws::MediaStore::StopAccessLogging', @_);
111 return $self->caller->do_call($self, $call_object);
112 }
113 sub TagResource {
114 my $self = shift;
115 my $call_object = $self->new_with_coercions('Paws::MediaStore::TagResource', @_);
116 return $self->caller->do_call($self, $call_object);
117 }
118 sub UntagResource {
119 my $self = shift;
120 my $call_object = $self->new_with_coercions('Paws::MediaStore::UntagResource', @_);
121 return $self->caller->do_call($self, $call_object);
122 }
123
124 sub ListAllContainers {
125 my $self = shift;
126  
127 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
128 my $result = $self->ListContainers(@_);
129 my $next_result = $result;
130  
131 if (not defined $callback) {
132 while ($next_result->NextToken) {
133 $next_result = $self->ListContainers(@_, NextToken => $next_result->NextToken);
134 push @{ $result->Containers }, @{ $next_result->Containers };
135 }
136 return $result;
137 } else {
138 while ($result->NextToken) {
139 $callback->($_ => 'Containers') foreach (@{ $result->Containers });
140 $result = $self->ListContainers(@_, NextToken => $result->NextToken);
141 }
142 $callback->($_ => 'Containers') foreach (@{ $result->Containers });
143 }
144  
145 return undef
146 }
147  
148  
149 sub operations { qw/CreateContainer DeleteContainer DeleteContainerPolicy DeleteCorsPolicy DeleteLifecyclePolicy DeleteMetricPolicy DescribeContainer GetContainerPolicy GetCorsPolicy GetLifecyclePolicy GetMetricPolicy ListContainers ListTagsForResource PutContainerPolicy PutCorsPolicy PutLifecyclePolicy PutMetricPolicy StartAccessLogging StopAccessLogging TagResource UntagResource / }
150  
151 1;
152  
153 ### main pod documentation begin ###
154  
155 =head1 NAME
156  
157 Paws::MediaStore - Perl Interface to AWS AWS Elemental MediaStore
158  
159 =head1 SYNOPSIS
160  
161 use Paws;
162  
163 my $obj = Paws->service('MediaStore');
164 my $res = $obj->Method(
165 Arg1 => $val1,
166 Arg2 => [ 'V1', 'V2' ],
167 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
168 # of the arguments type
169 Arg3 => { Att1 => 'Val1' },
170 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
171 # the constructor of the arguments type
172 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
173 );
174  
175 =head1 DESCRIPTION
176  
177 An AWS Elemental MediaStore container is a namespace that holds folders
178 and objects. You use a container endpoint to create, read, and delete
179 objects.
180  
181 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01>
182  
183  
184 =head1 METHODS
185  
186 =head2 CreateContainer
187  
188 =over
189  
190 =item ContainerName => Str
191  
192 =item [Tags => ArrayRef[L<Paws::MediaStore::Tag>]]
193  
194  
195 =back
196  
197 Each argument is described in detail in: L<Paws::MediaStore::CreateContainer>
198  
199 Returns: a L<Paws::MediaStore::CreateContainerOutput> instance
200  
201 Creates a storage container to hold objects. A container is similar to
202 a bucket in the Amazon S3 service.
203  
204  
205 =head2 DeleteContainer
206  
207 =over
208  
209 =item ContainerName => Str
210  
211  
212 =back
213  
214 Each argument is described in detail in: L<Paws::MediaStore::DeleteContainer>
215  
216 Returns: a L<Paws::MediaStore::DeleteContainerOutput> instance
217  
218 Deletes the specified container. Before you make a C<DeleteContainer>
219 request, delete any objects in the container or in any folders in the
220 container. You can delete only empty containers.
221  
222  
223 =head2 DeleteContainerPolicy
224  
225 =over
226  
227 =item ContainerName => Str
228  
229  
230 =back
231  
232 Each argument is described in detail in: L<Paws::MediaStore::DeleteContainerPolicy>
233  
234 Returns: a L<Paws::MediaStore::DeleteContainerPolicyOutput> instance
235  
236 Deletes the access policy that is associated with the specified
237 container.
238  
239  
240 =head2 DeleteCorsPolicy
241  
242 =over
243  
244 =item ContainerName => Str
245  
246  
247 =back
248  
249 Each argument is described in detail in: L<Paws::MediaStore::DeleteCorsPolicy>
250  
251 Returns: a L<Paws::MediaStore::DeleteCorsPolicyOutput> instance
252  
253 Deletes the cross-origin resource sharing (CORS) configuration
254 information that is set for the container.
255  
256 To use this operation, you must have permission to perform the
257 C<MediaStore:DeleteCorsPolicy> action. The container owner has this
258 permission by default and can grant this permission to others.
259  
260  
261 =head2 DeleteLifecyclePolicy
262  
263 =over
264  
265 =item ContainerName => Str
266  
267  
268 =back
269  
270 Each argument is described in detail in: L<Paws::MediaStore::DeleteLifecyclePolicy>
271  
272 Returns: a L<Paws::MediaStore::DeleteLifecyclePolicyOutput> instance
273  
274 Removes an object lifecycle policy from a container. It takes up to 20
275 minutes for the change to take effect.
276  
277  
278 =head2 DeleteMetricPolicy
279  
280 =over
281  
282 =item ContainerName => Str
283  
284  
285 =back
286  
287 Each argument is described in detail in: L<Paws::MediaStore::DeleteMetricPolicy>
288  
289 Returns: a L<Paws::MediaStore::DeleteMetricPolicyOutput> instance
290  
291 Deletes the metric policy that is associated with the specified
292 container. If there is no metric policy associated with the container,
293 MediaStore doesn't send metrics to CloudWatch.
294  
295  
296 =head2 DescribeContainer
297  
298 =over
299  
300 =item [ContainerName => Str]
301  
302  
303 =back
304  
305 Each argument is described in detail in: L<Paws::MediaStore::DescribeContainer>
306  
307 Returns: a L<Paws::MediaStore::DescribeContainerOutput> instance
308  
309 Retrieves the properties of the requested container. This request is
310 commonly used to retrieve the endpoint of a container. An endpoint is a
311 value assigned by the service when a new container is created. A
312 container's endpoint does not change after it has been assigned. The
313 C<DescribeContainer> request returns a single C<Container> object based
314 on C<ContainerName>. To return all C<Container> objects that are
315 associated with a specified AWS account, use ListContainers.
316  
317  
318 =head2 GetContainerPolicy
319  
320 =over
321  
322 =item ContainerName => Str
323  
324  
325 =back
326  
327 Each argument is described in detail in: L<Paws::MediaStore::GetContainerPolicy>
328  
329 Returns: a L<Paws::MediaStore::GetContainerPolicyOutput> instance
330  
331 Retrieves the access policy for the specified container. For
332 information about the data that is included in an access policy, see
333 the AWS Identity and Access Management User Guide
334 (https://aws.amazon.com/documentation/iam/).
335  
336  
337 =head2 GetCorsPolicy
338  
339 =over
340  
341 =item ContainerName => Str
342  
343  
344 =back
345  
346 Each argument is described in detail in: L<Paws::MediaStore::GetCorsPolicy>
347  
348 Returns: a L<Paws::MediaStore::GetCorsPolicyOutput> instance
349  
350 Returns the cross-origin resource sharing (CORS) configuration
351 information that is set for the container.
352  
353 To use this operation, you must have permission to perform the
354 C<MediaStore:GetCorsPolicy> action. By default, the container owner has
355 this permission and can grant it to others.
356  
357  
358 =head2 GetLifecyclePolicy
359  
360 =over
361  
362 =item ContainerName => Str
363  
364  
365 =back
366  
367 Each argument is described in detail in: L<Paws::MediaStore::GetLifecyclePolicy>
368  
369 Returns: a L<Paws::MediaStore::GetLifecyclePolicyOutput> instance
370  
371 Retrieves the object lifecycle policy that is assigned to a container.
372  
373  
374 =head2 GetMetricPolicy
375  
376 =over
377  
378 =item ContainerName => Str
379  
380  
381 =back
382  
383 Each argument is described in detail in: L<Paws::MediaStore::GetMetricPolicy>
384  
385 Returns: a L<Paws::MediaStore::GetMetricPolicyOutput> instance
386  
387 Returns the metric policy for the specified container.
388  
389  
390 =head2 ListContainers
391  
392 =over
393  
394 =item [MaxResults => Int]
395  
396 =item [NextToken => Str]
397  
398  
399 =back
400  
401 Each argument is described in detail in: L<Paws::MediaStore::ListContainers>
402  
403 Returns: a L<Paws::MediaStore::ListContainersOutput> instance
404  
405 Lists the properties of all containers in AWS Elemental MediaStore.
406  
407 You can query to receive all the containers in one response. Or you can
408 include the C<MaxResults> parameter to receive a limited number of
409 containers in each response. In this case, the response includes a
410 token. To get the next set of containers, send the command again, this
411 time with the C<NextToken> parameter (with the returned token as its
412 value). The next set of responses appears, with a token if there are
413 still more containers to receive.
414  
415 See also DescribeContainer, which gets the properties of one container.
416  
417  
418 =head2 ListTagsForResource
419  
420 =over
421  
422 =item Resource => Str
423  
424  
425 =back
426  
427 Each argument is described in detail in: L<Paws::MediaStore::ListTagsForResource>
428  
429 Returns: a L<Paws::MediaStore::ListTagsForResourceOutput> instance
430  
431 Returns a list of the tags assigned to the specified container.
432  
433  
434 =head2 PutContainerPolicy
435  
436 =over
437  
438 =item ContainerName => Str
439  
440 =item Policy => Str
441  
442  
443 =back
444  
445 Each argument is described in detail in: L<Paws::MediaStore::PutContainerPolicy>
446  
447 Returns: a L<Paws::MediaStore::PutContainerPolicyOutput> instance
448  
449 Creates an access policy for the specified container to restrict the
450 users and clients that can access it. For information about the data
451 that is included in an access policy, see the AWS Identity and Access
452 Management User Guide (https://aws.amazon.com/documentation/iam/).
453  
454 For this release of the REST API, you can create only one policy for a
455 container. If you enter C<PutContainerPolicy> twice, the second command
456 modifies the existing policy.
457  
458  
459 =head2 PutCorsPolicy
460  
461 =over
462  
463 =item ContainerName => Str
464  
465 =item CorsPolicy => ArrayRef[L<Paws::MediaStore::CorsRule>]
466  
467  
468 =back
469  
470 Each argument is described in detail in: L<Paws::MediaStore::PutCorsPolicy>
471  
472 Returns: a L<Paws::MediaStore::PutCorsPolicyOutput> instance
473  
474 Sets the cross-origin resource sharing (CORS) configuration on a
475 container so that the container can service cross-origin requests. For
476 example, you might want to enable a request whose origin is
477 http://www.example.com to access your AWS Elemental MediaStore
478 container at my.example.container.com by using the browser's
479 XMLHttpRequest capability.
480  
481 To enable CORS on a container, you attach a CORS policy to the
482 container. In the CORS policy, you configure rules that identify
483 origins and the HTTP methods that can be executed on your container.
484 The policy can contain up to 398,000 characters. You can add up to 100
485 rules to a CORS policy. If more than one rule applies, the service uses
486 the first applicable rule listed.
487  
488 To learn more about CORS, see Cross-Origin Resource Sharing (CORS) in
489 AWS Elemental MediaStore
490 (https://docs.aws.amazon.com/mediastore/latest/ug/cors-policy.html).
491  
492  
493 =head2 PutLifecyclePolicy
494  
495 =over
496  
497 =item ContainerName => Str
498  
499 =item LifecyclePolicy => Str
500  
501  
502 =back
503  
504 Each argument is described in detail in: L<Paws::MediaStore::PutLifecyclePolicy>
505  
506 Returns: a L<Paws::MediaStore::PutLifecyclePolicyOutput> instance
507  
508 Writes an object lifecycle policy to a container. If the container
509 already has an object lifecycle policy, the service replaces the
510 existing policy with the new policy. It takes up to 20 minutes for the
511 change to take effect.
512  
513 For information about how to construct an object lifecycle policy, see
514 Components of an Object Lifecycle Policy
515 (https://docs.aws.amazon.com/mediastore/latest/ug/policies-object-lifecycle-components.html).
516  
517  
518 =head2 PutMetricPolicy
519  
520 =over
521  
522 =item ContainerName => Str
523  
524 =item MetricPolicy => L<Paws::MediaStore::MetricPolicy>
525  
526  
527 =back
528  
529 Each argument is described in detail in: L<Paws::MediaStore::PutMetricPolicy>
530  
531 Returns: a L<Paws::MediaStore::PutMetricPolicyOutput> instance
532  
533 The metric policy that you want to add to the container. A metric
534 policy allows AWS Elemental MediaStore to send metrics to Amazon
535 CloudWatch. It takes up to 20 minutes for the new policy to take
536 effect.
537  
538  
539 =head2 StartAccessLogging
540  
541 =over
542  
543 =item ContainerName => Str
544  
545  
546 =back
547  
548 Each argument is described in detail in: L<Paws::MediaStore::StartAccessLogging>
549  
550 Returns: a L<Paws::MediaStore::StartAccessLoggingOutput> instance
551  
552 Starts access logging on the specified container. When you enable
553 access logging on a container, MediaStore delivers access logs for
554 objects stored in that container to Amazon CloudWatch Logs.
555  
556  
557 =head2 StopAccessLogging
558  
559 =over
560  
561 =item ContainerName => Str
562  
563  
564 =back
565  
566 Each argument is described in detail in: L<Paws::MediaStore::StopAccessLogging>
567  
568 Returns: a L<Paws::MediaStore::StopAccessLoggingOutput> instance
569  
570 Stops access logging on the specified container. When you stop access
571 logging on a container, MediaStore stops sending access logs to Amazon
572 CloudWatch Logs. These access logs are not saved and are not
573 retrievable.
574  
575  
576 =head2 TagResource
577  
578 =over
579  
580 =item Resource => Str
581  
582 =item Tags => ArrayRef[L<Paws::MediaStore::Tag>]
583  
584  
585 =back
586  
587 Each argument is described in detail in: L<Paws::MediaStore::TagResource>
588  
589 Returns: a L<Paws::MediaStore::TagResourceOutput> instance
590  
591 Adds tags to the specified AWS Elemental MediaStore container. Tags are
592 key:value pairs that you can associate with AWS resources. For example,
593 the tag key might be "customer" and the tag value might be "companyA."
594 You can specify one or more tags to add to each container. You can add
595 up to 50 tags to each container. For more information about tagging,
596 including naming and usage conventions, see Tagging Resources in
597 MediaStore
598 (https://docs.aws.amazon.com/mediastore/latest/ug/tagging.html).
599  
600  
601 =head2 UntagResource
602  
603 =over
604  
605 =item Resource => Str
606  
607 =item TagKeys => ArrayRef[Str|Undef]
608  
609  
610 =back
611  
612 Each argument is described in detail in: L<Paws::MediaStore::UntagResource>
613  
614 Returns: a L<Paws::MediaStore::UntagResourceOutput> instance
615  
616 Removes tags from the specified container. You can specify one or more
617 tags to remove.
618  
619  
620  
621  
622 =head1 PAGINATORS
623  
624 Paginator methods are helpers that repetively call methods that return partial results
625  
626 =head2 ListAllContainers(sub { },[MaxResults => Int, NextToken => Str])
627  
628 =head2 ListAllContainers([MaxResults => Int, NextToken => Str])
629  
630  
631 If passed a sub as first parameter, it will call the sub for each element found in :
632  
633 - Containers, passing the object as the first parameter, and the string 'Containers' as the second parameter
634  
635 If not, it will return a a L<Paws::MediaStore::ListContainersOutput> 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.
636  
637  
638  
639  
640  
641 =head1 SEE ALSO
642  
643 This service class forms part of L<Paws>
644  
645 =head1 BUGS and CONTRIBUTIONS
646  
647 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
648  
649 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
650  
651 =cut
652