| 1 | package Paws::CUR; | ||
| 2 | use Moose; | ||
| 3 | sub service { 'cur' } | ||
| 4 | sub signing_name { 'cur' } | ||
| 5 | sub version { '2017-01-06' } | ||
| 6 | sub target_prefix { 'AWSOrigamiServiceGatewayService' } | ||
| 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 DeleteReportDefinition { | ||
| 19 | my $self = shift; | ||
| 20 | my $call_object = $self->new_with_coercions('Paws::CUR::DeleteReportDefinition', @_); | ||
| 21 | return $self->caller->do_call($self, $call_object); | ||
| 22 | } | ||
| 23 | sub DescribeReportDefinitions { | ||
| 24 | my $self = shift; | ||
| 25 | my $call_object = $self->new_with_coercions('Paws::CUR::DescribeReportDefinitions', @_); | ||
| 26 | return $self->caller->do_call($self, $call_object); | ||
| 27 | } | ||
| 28 | sub ModifyReportDefinition { | ||
| 29 | my $self = shift; | ||
| 30 | my $call_object = $self->new_with_coercions('Paws::CUR::ModifyReportDefinition', @_); | ||
| 31 | return $self->caller->do_call($self, $call_object); | ||
| 32 | } | ||
| 33 | sub PutReportDefinition { | ||
| 34 | my $self = shift; | ||
| 35 | my $call_object = $self->new_with_coercions('Paws::CUR::PutReportDefinition', @_); | ||
| 36 | return $self->caller->do_call($self, $call_object); | ||
| 37 | } | ||
| 38 | |||
| 39 | sub DescribeAllReportDefinitions { | ||
| 40 | my $self = shift; | ||
| 41 | |||
| 42 | my $callback = shift @_ if (ref($_[0]) eq 'CODE'); | ||
| 43 | my $result = $self->DescribeReportDefinitions(@_); | ||
| 44 | my $next_result = $result; | ||
| 45 | |||
| 46 | if (not defined $callback) { | ||
| 47 | while ($next_result->NextToken) { | ||
| 48 | $next_result = $self->DescribeReportDefinitions(@_, NextToken => $next_result->NextToken); | ||
| 49 | push @{ $result->ReportDefinitions }, @{ $next_result->ReportDefinitions }; | ||
| 50 | } | ||
| 51 | return $result; | ||
| 52 | } else { | ||
| 53 | while ($result->NextToken) { | ||
| 54 | $callback->($_ => 'ReportDefinitions') foreach (@{ $result->ReportDefinitions }); | ||
| 55 | $result = $self->DescribeReportDefinitions(@_, NextToken => $result->NextToken); | ||
| 56 | } | ||
| 57 | $callback->($_ => 'ReportDefinitions') foreach (@{ $result->ReportDefinitions }); | ||
| 58 | } | ||
| 59 | |||
| 60 | return undef | ||
| 61 | } | ||
| 62 | |||
| 63 | |||
| 64 | sub operations { qw/DeleteReportDefinition DescribeReportDefinitions ModifyReportDefinition PutReportDefinition / } | ||
| 65 | |||
| 66 | 1; | ||
| 67 | |||
| 68 | ### main pod documentation begin ### | ||
| 69 | |||
| 70 | =head1 NAME | ||
| 71 | |||
| 72 | Paws::CUR - Perl Interface to AWS AWS Cost and Usage Report Service | ||
| 73 | |||
| 74 | =head1 SYNOPSIS | ||
| 75 | |||
| 76 | use Paws; | ||
| 77 | |||
| 78 | my $obj = Paws->service('CUR'); | ||
| 79 | my $res = $obj->Method( | ||
| 80 | Arg1 => $val1, | ||
| 81 | Arg2 => [ 'V1', 'V2' ], | ||
| 82 | # if Arg3 is an object, the HashRef will be used as arguments to the constructor | ||
| 83 | # of the arguments type | ||
| 84 | Arg3 => { Att1 => 'Val1' }, | ||
| 85 | # if Arg4 is an array of objects, the HashRefs will be passed as arguments to | ||
| 86 | # the constructor of the arguments type | ||
| 87 | Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ], | ||
| 88 | ); | ||
| 89 | |||
| 90 | =head1 DESCRIPTION | ||
| 91 | |||
| 92 | The AWS Cost and Usage Report API enables you to programmatically | ||
| 93 | create, query, and delete AWS Cost and Usage report definitions. | ||
| 94 | |||
| 95 | AWS Cost and Usage reports track the monthly AWS costs and usage | ||
| 96 | associated with your AWS account. The report contains line items for | ||
| 97 | each unique combination of AWS product, usage type, and operation that | ||
| 98 | your AWS account uses. You can configure the AWS Cost and Usage report | ||
| 99 | to show only the data that you want, using the AWS Cost and Usage API. | ||
| 100 | |||
| 101 | Service Endpoint | ||
| 102 | |||
| 103 | The AWS Cost and Usage Report API provides the following endpoint: | ||
| 104 | |||
| 105 | =over | ||
| 106 | |||
| 107 | =item * | ||
| 108 | |||
| 109 | cur.us-east-1.amazonaws.com | ||
| 110 | |||
| 111 | =back | ||
| 112 | |||
| 113 | |||
| 114 | For the AWS API documentation, see L<https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-reports-costusage.html> | ||
| 115 | |||
| 116 | |||
| 117 | =head1 METHODS | ||
| 118 | |||
| 119 | =head2 DeleteReportDefinition | ||
| 120 | |||
| 121 | =over | ||
| 122 | |||
| 123 | =item [ReportName => Str] | ||
| 124 | |||
| 125 | |||
| 126 | =back | ||
| 127 | |||
| 128 | Each argument is described in detail in: L<Paws::CUR::DeleteReportDefinition> | ||
| 129 | |||
| 130 | Returns: a L<Paws::CUR::DeleteReportDefinitionResponse> instance | ||
| 131 | |||
| 132 | Deletes the specified report. | ||
| 133 | |||
| 134 | |||
| 135 | =head2 DescribeReportDefinitions | ||
| 136 | |||
| 137 | =over | ||
| 138 | |||
| 139 | =item [MaxResults => Int] | ||
| 140 | |||
| 141 | =item [NextToken => Str] | ||
| 142 | |||
| 143 | |||
| 144 | =back | ||
| 145 | |||
| 146 | Each argument is described in detail in: L<Paws::CUR::DescribeReportDefinitions> | ||
| 147 | |||
| 148 | Returns: a L<Paws::CUR::DescribeReportDefinitionsResponse> instance | ||
| 149 | |||
| 150 | Lists the AWS Cost and Usage reports available to this account. | ||
| 151 | |||
| 152 | |||
| 153 | =head2 ModifyReportDefinition | ||
| 154 | |||
| 155 | =over | ||
| 156 | |||
| 157 | =item ReportDefinition => L<Paws::CUR::ReportDefinition> | ||
| 158 | |||
| 159 | =item ReportName => Str | ||
| 160 | |||
| 161 | |||
| 162 | =back | ||
| 163 | |||
| 164 | Each argument is described in detail in: L<Paws::CUR::ModifyReportDefinition> | ||
| 165 | |||
| 166 | Returns: a L<Paws::CUR::ModifyReportDefinitionResponse> instance | ||
| 167 | |||
| 168 | Allows you to programatically update your report preferences. | ||
| 169 | |||
| 170 | |||
| 171 | =head2 PutReportDefinition | ||
| 172 | |||
| 173 | =over | ||
| 174 | |||
| 175 | =item ReportDefinition => L<Paws::CUR::ReportDefinition> | ||
| 176 | |||
| 177 | |||
| 178 | =back | ||
| 179 | |||
| 180 | Each argument is described in detail in: L<Paws::CUR::PutReportDefinition> | ||
| 181 | |||
| 182 | Returns: a L<Paws::CUR::PutReportDefinitionResponse> instance | ||
| 183 | |||
| 184 | Creates a new report using the description that you provide. | ||
| 185 | |||
| 186 | |||
| 187 | |||
| 188 | |||
| 189 | =head1 PAGINATORS | ||
| 190 | |||
| 191 | Paginator methods are helpers that repetively call methods that return partial results | ||
| 192 | |||
| 193 | =head2 DescribeAllReportDefinitions(sub { },[MaxResults => Int, NextToken => Str]) | ||
| 194 | |||
| 195 | =head2 DescribeAllReportDefinitions([MaxResults => Int, NextToken => Str]) | ||
| 196 | |||
| 197 | |||
| 198 | If passed a sub as first parameter, it will call the sub for each element found in : | ||
| 199 | |||
| 200 | - ReportDefinitions, passing the object as the first parameter, and the string 'ReportDefinitions' as the second parameter | ||
| 201 | |||
| 202 | 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. | ||
| 203 | |||
| 204 | |||
| 205 | |||
| 206 | |||
| 207 | |||
| 208 | =head1 SEE ALSO | ||
| 209 | |||
| 210 | This service class forms part of L<Paws> | ||
| 211 | |||
| 212 | =head1 BUGS and CONTRIBUTIONS | ||
| 213 | |||
| 214 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 215 | |||
| 216 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 217 | |||
| 218 | =cut | ||
| 219 |