blib/lib/Paws/CostExplorer/GetReservationCoverage.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::CostExplorer::GetReservationCoverage;
3 use Moose;
4 has Filter => (is => 'ro', isa => 'Paws::CostExplorer::Expression');
5 has Granularity => (is => 'ro', isa => 'Str');
6 has GroupBy => (is => 'ro', isa => 'ArrayRef[Paws::CostExplorer::GroupDefinition]');
7 has MaxResults => (is => 'ro', isa => 'Int');
8 has Metrics => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
9 has NextPageToken => (is => 'ro', isa => 'Str');
10 has SortBy => (is => 'ro', isa => 'Paws::CostExplorer::SortDefinition');
11 has TimePeriod => (is => 'ro', isa => 'Paws::CostExplorer::DateInterval', required => 1);
12  
13 use MooseX::ClassAttribute;
14  
15 class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetReservationCoverage');
16 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CostExplorer::GetReservationCoverageResponse');
17 class_has _result_key => (isa => 'Str', is => 'ro');
18 1;
19  
20 ### main pod documentation begin ###
21  
22 =head1 NAME
23  
24 Paws::CostExplorer::GetReservationCoverage - Arguments for method GetReservationCoverage on L<Paws::CostExplorer>
25  
26 =head1 DESCRIPTION
27  
28 This class represents the parameters used for calling the method GetReservationCoverage on the
29 L<AWS Cost Explorer Service|Paws::CostExplorer> service. Use the attributes of this class
30 as arguments to method GetReservationCoverage.
31  
32 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetReservationCoverage.
33  
34 =head1 SYNOPSIS
35  
36 my $ce = Paws->service('CostExplorer');
37 my $GetReservationCoverageResponse = $ce->GetReservationCoverage(
38 TimePeriod => {
39 End => 'MyYearMonthDay', # max: 40
40 Start => 'MyYearMonthDay', # max: 40
41  
42 },
43 Filter => {
44 And => [ <Expression>, ... ], # OPTIONAL
45 CostCategories => {
46 Key => 'MyCostCategoryName', # min: 1, max: 50; OPTIONAL
47 MatchOptions => [
48 'EQUALS',
49 ... # values: EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE
50 ], # OPTIONAL
51 Values => [
52 'MyValue', ... # max: 1024
53 ], # OPTIONAL
54 }, # OPTIONAL
55 Dimensions => {
56 Key => 'AZ'
57 , # values: AZ, INSTANCE_TYPE, LINKED_ACCOUNT, LINKED_ACCOUNT_NAME, OPERATION, PURCHASE_TYPE, REGION, SERVICE, SERVICE_CODE, USAGE_TYPE, USAGE_TYPE_GROUP, RECORD_TYPE, OPERATING_SYSTEM, TENANCY, SCOPE, PLATFORM, SUBSCRIPTION_ID, LEGAL_ENTITY_NAME, DEPLOYMENT_OPTION, DATABASE_ENGINE, CACHE_ENGINE, INSTANCE_TYPE_FAMILY, BILLING_ENTITY, RESERVATION_ID, RESOURCE_ID, RIGHTSIZING_TYPE, SAVINGS_PLANS_TYPE, SAVINGS_PLAN_ARN, PAYMENT_OPTION, AGREEMENT_END_DATE_TIME_AFTER, AGREEMENT_END_DATE_TIME_BEFORE; OPTIONAL
58 MatchOptions => [
59 'EQUALS',
60 ... # values: EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE
61 ], # OPTIONAL
62 Values => [
63 'MyValue', ... # max: 1024
64 ], # OPTIONAL
65 }, # OPTIONAL
66 Not => <Expression>,
67 Or => [ <Expression>, ... ], # OPTIONAL
68 Tags => {
69 Key => 'MyTagKey', # max: 1024; OPTIONAL
70 MatchOptions => [
71 'EQUALS',
72 ... # values: EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE
73 ], # OPTIONAL
74 Values => [
75 'MyValue', ... # max: 1024
76 ], # OPTIONAL
77 }, # OPTIONAL
78 }, # OPTIONAL
79 Granularity => 'DAILY', # OPTIONAL
80 GroupBy => [
81 {
82 Key => 'MyGroupDefinitionKey', # max: 1024; OPTIONAL
83 Type => 'DIMENSION', # values: DIMENSION, TAG, COST_CATEGORY; OPTIONAL
84 },
85 ...
86 ], # OPTIONAL
87 MaxResults => 1, # OPTIONAL
88 Metrics => [
89 'MyMetricName', ... # max: 1024
90 ], # OPTIONAL
91 NextPageToken => 'MyNextPageToken', # OPTIONAL
92 SortBy => {
93 Key => 'MySortDefinitionKey', # max: 1024
94 SortOrder => 'ASCENDING', # values: ASCENDING, DESCENDING; OPTIONAL
95 }, # OPTIONAL
96 );
97  
98 # Results:
99 my $CoveragesByTime = $GetReservationCoverageResponse->CoveragesByTime;
100 my $NextPageToken = $GetReservationCoverageResponse->NextPageToken;
101 my $Total = $GetReservationCoverageResponse->Total;
102  
103 # Returns a L<Paws::CostExplorer::GetReservationCoverageResponse> object.
104  
105 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
106 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ce/GetReservationCoverage>
107  
108 =head1 ATTRIBUTES
109  
110  
111 =head2 Filter => L<Paws::CostExplorer::Expression>
112  
113 Filters utilization data by dimensions. You can filter by the following
114 dimensions:
115  
116 =over
117  
118 =item *
119  
120 AZ
121  
122 =item *
123  
124 CACHE_ENGINE
125  
126 =item *
127  
128 DATABASE_ENGINE
129  
130 =item *
131  
132 DEPLOYMENT_OPTION
133  
134 =item *
135  
136 INSTANCE_TYPE
137  
138 =item *
139  
140 LINKED_ACCOUNT
141  
142 =item *
143  
144 OPERATING_SYSTEM
145  
146 =item *
147  
148 PLATFORM
149  
150 =item *
151  
152 REGION
153  
154 =item *
155  
156 SERVICE
157  
158 =item *
159  
160 TAG
161  
162 =item *
163  
164 TENANCY
165  
166 =back
167  
168 C<GetReservationCoverage> uses the same Expression
169 (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html)
170 object as the other operations, but only C<AND> is supported among each
171 dimension. You can nest only one level deep. If there are multiple
172 values for a dimension, they are OR'd together.
173  
174 If you don't provide a C<SERVICE> filter, Cost Explorer defaults to
175 EC2.
176  
177 Cost category is also supported.
178  
179  
180  
181 =head2 Granularity => Str
182  
183 The granularity of the AWS cost data for the reservation. Valid values
184 are C<MONTHLY> and C<DAILY>.
185  
186 If C<GroupBy> is set, C<Granularity> can't be set. If C<Granularity>
187 isn't set, the response object doesn't include C<Granularity>, either
188 C<MONTHLY> or C<DAILY>.
189  
190 The C<GetReservationCoverage> operation supports only C<DAILY> and
191 C<MONTHLY> granularities.
192  
193 Valid values are: C<"DAILY">, C<"MONTHLY">, C<"HOURLY">
194  
195 =head2 GroupBy => ArrayRef[L<Paws::CostExplorer::GroupDefinition>]
196  
197 You can group the data by the following attributes:
198  
199 =over
200  
201 =item *
202  
203 AZ
204  
205 =item *
206  
207 CACHE_ENGINE
208  
209 =item *
210  
211 DATABASE_ENGINE
212  
213 =item *
214  
215 DEPLOYMENT_OPTION
216  
217 =item *
218  
219 INSTANCE_TYPE
220  
221 =item *
222  
223 LINKED_ACCOUNT
224  
225 =item *
226  
227 OPERATING_SYSTEM
228  
229 =item *
230  
231 PLATFORM
232  
233 =item *
234  
235 REGION
236  
237 =item *
238  
239 TENANCY
240  
241 =back
242  
243  
244  
245  
246 =head2 MaxResults => Int
247  
248 The maximum number of objects that you returned for this request. If
249 more objects are available, in the response, AWS provides a
250 NextPageToken value that you can use in a subsequent call to get the
251 next batch of objects.
252  
253  
254  
255 =head2 Metrics => ArrayRef[Str|Undef]
256  
257 The measurement that you want your reservation coverage reported in.
258  
259 Valid values are C<Hour>, C<Unit>, and C<Cost>. You can use multiple
260 values in a request.
261  
262  
263  
264 =head2 NextPageToken => Str
265  
266 The token to retrieve the next set of results. AWS provides the token
267 when the response from a previous call has more results than the
268 maximum page size.
269  
270  
271  
272 =head2 SortBy => L<Paws::CostExplorer::SortDefinition>
273  
274 The value by which you want to sort the data.
275  
276 The following values are supported for C<Key>:
277  
278 =over
279  
280 =item *
281  
282 C<OnDemandCost>
283  
284 =item *
285  
286 C<CoverageHoursPercentage>
287  
288 =item *
289  
290 C<OnDemandHours>
291  
292 =item *
293  
294 C<ReservedHours>
295  
296 =item *
297  
298 C<TotalRunningHours>
299  
300 =item *
301  
302 C<CoverageNormalizedUnitsPercentage>
303  
304 =item *
305  
306 C<OnDemandNormalizedUnits>
307  
308 =item *
309  
310 C<ReservedNormalizedUnits>
311  
312 =item *
313  
314 C<TotalRunningNormalizedUnits>
315  
316 =item *
317  
318 C<Time>
319  
320 =back
321  
322 Supported values for C<SortOrder> are C<ASCENDING> or C<DESCENDING>.
323  
324  
325  
326 =head2 B<REQUIRED> TimePeriod => L<Paws::CostExplorer::DateInterval>
327  
328 The start and end dates of the period that you want to retrieve data
329 about reservation coverage for. You can retrieve data for a maximum of
330 13 months: the last 12 months and the current month. The start date is
331 inclusive, but the end date is exclusive. For example, if C<start> is
332 C<2017-01-01> and C<end> is C<2017-05-01>, then the cost and usage data
333 is retrieved from C<2017-01-01> up to and including C<2017-04-30> but
334 not including C<2017-05-01>.
335  
336  
337  
338  
339 =head1 SEE ALSO
340  
341 This class forms part of L<Paws>, documenting arguments for method GetReservationCoverage in L<Paws::CostExplorer>
342  
343 =head1 BUGS and CONTRIBUTIONS
344  
345 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
346  
347 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
348  
349 =cut
350