File Coverage

blib/lib/Paws/CUR.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::CUR;
2 1     1   1608 use Moose;
  1         11  
  1         7  
3             sub service { 'cur' }
4             sub version { '2017-01-06' }
5             sub target_prefix { 'AWSOrigamiServiceGatewayService' }
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 DeleteReportDefinition {
18             my $self = shift;
19             my $call_object = $self->new_with_coercions('Paws::CUR::DeleteReportDefinition', @_);
20             return $self->caller->do_call($self, $call_object);
21             }
22             sub DescribeReportDefinitions {
23             my $self = shift;
24             my $call_object = $self->new_with_coercions('Paws::CUR::DescribeReportDefinitions', @_);
25             return $self->caller->do_call($self, $call_object);
26             }
27             sub PutReportDefinition {
28             my $self = shift;
29             my $call_object = $self->new_with_coercions('Paws::CUR::PutReportDefinition', @_);
30             return $self->caller->do_call($self, $call_object);
31             }
32            
33             sub DescribeAllReportDefinitions {
34             my $self = shift;
35              
36             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
37             my $result = $self->DescribeReportDefinitions(@_);
38             my $next_result = $result;
39              
40             if (not defined $callback) {
41             while ($next_result->NextToken) {
42             $next_result = $self->DescribeReportDefinitions(@_, NextToken => $next_result->NextToken);
43             push @{ $result->ReportDefinitions }, @{ $next_result->ReportDefinitions };
44             }
45             return $result;
46             } else {
47             while ($result->NextToken) {
48             $callback->($_ => 'ReportDefinitions') foreach (@{ $result->ReportDefinitions });
49             $result = $self->DescribeReportDefinitions(@_, NextToken => $result->NextToken);
50             }
51             $callback->($_ => 'ReportDefinitions') foreach (@{ $result->ReportDefinitions });
52             }
53              
54             return undef
55             }
56              
57              
58             sub operations { qw/DeleteReportDefinition DescribeReportDefinitions PutReportDefinition / }
59              
60             1;
61              
62             ### main pod documentation begin ###
63              
64             =head1 NAME
65              
66             Paws::CUR - Perl Interface to AWS AWS Cost and Usage Report Service
67              
68             =head1 SYNOPSIS
69              
70             use Paws;
71              
72             my $obj = Paws->service('CUR');
73             my $res = $obj->Method(
74             Arg1 => $val1,
75             Arg2 => [ 'V1', 'V2' ],
76             # if Arg3 is an object, the HashRef will be used as arguments to the constructor
77             # of the arguments type
78             Arg3 => { Att1 => 'Val1' },
79             # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
80             # the constructor of the arguments type
81             Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
82             );
83              
84             =head1 DESCRIPTION
85              
86             All public APIs for AWS Cost and Usage Report service
87              
88             =head1 METHODS
89              
90             =head2 DeleteReportDefinition([ReportName => Str])
91              
92             Each argument is described in detail in: L<Paws::CUR::DeleteReportDefinition>
93              
94             Returns: a L<Paws::CUR::DeleteReportDefinitionResponse> instance
95              
96             Delete a specified report definition
97              
98              
99             =head2 DescribeReportDefinitions([MaxResults => Int, NextToken => Str])
100              
101             Each argument is described in detail in: L<Paws::CUR::DescribeReportDefinitions>
102              
103             Returns: a L<Paws::CUR::DescribeReportDefinitionsResponse> instance
104              
105             Describe a list of report definitions owned by the account
106              
107              
108             =head2 PutReportDefinition(ReportDefinition => L<Paws::CUR::ReportDefinition>)
109              
110             Each argument is described in detail in: L<Paws::CUR::PutReportDefinition>
111              
112             Returns: a L<Paws::CUR::PutReportDefinitionResponse> instance
113              
114             Create a new report definition
115              
116              
117              
118              
119             =head1 PAGINATORS
120              
121             Paginator methods are helpers that repetively call methods that return partial results
122              
123             =head2 DescribeAllReportDefinitions(sub { },[MaxResults => Int, NextToken => Str])
124              
125             =head2 DescribeAllReportDefinitions([MaxResults => Int, NextToken => Str])
126              
127              
128             If passed a sub as first parameter, it will call the sub for each element found in :
129              
130             - ReportDefinitions, passing the object as the first parameter, and the string 'ReportDefinitions' as the second parameter
131              
132             If not, it will return a a L<Paws::CUR::DescribeReportDefinitionsResponse> 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.
133              
134              
135              
136              
137              
138             =head1 SEE ALSO
139              
140             This service class forms part of L<Paws>
141              
142             =head1 BUGS and CONTRIBUTIONS
143              
144             The source code is located here: https://github.com/pplu/aws-sdk-perl
145              
146             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
147              
148             =cut
149