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

filter: Statementstmt 0.0% 0 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 16 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::CostExplorer::GetUsageForecast;
3 use Moose;
4 has Filter => (is => 'ro', isa => 'Paws::CostExplorer::Expression');
5 has Granularity => (is => 'ro', isa => 'Str', required => 1);
6 has Metric => (is => 'ro', isa => 'Str', required => 1);
7 has PredictionIntervalLevel => (is => 'ro', isa => 'Int');
8 has TimePeriod => (is => 'ro', isa => 'Paws::CostExplorer::DateInterval', required => 1);
9  
10 use MooseX::ClassAttribute;
11  
12 class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetUsageForecast');
13 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CostExplorer::GetUsageForecastResponse');
14 class_has _result_key => (isa => 'Str', is => 'ro');
15 1;
16  
17 ### main pod documentation begin ###
18  
19 =head1 NAME
20  
21 Paws::CostExplorer::GetUsageForecast - Arguments for method GetUsageForecast on L<Paws::CostExplorer>
22  
23 =head1 DESCRIPTION
24  
25 This class represents the parameters used for calling the method GetUsageForecast on the
26 L<AWS Cost Explorer Service|Paws::CostExplorer> service. Use the attributes of this class
27 as arguments to method GetUsageForecast.
28  
29 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetUsageForecast.
30  
31 =head1 SYNOPSIS
32  
33 my $ce = Paws->service('CostExplorer');
34 my $GetUsageForecastResponse = $ce->GetUsageForecast(
35 Granularity => 'DAILY',
36 Metric => 'BLENDED_COST',
37 TimePeriod => {
38 End => 'MyYearMonthDay', # max: 40
39 Start => 'MyYearMonthDay', # max: 40
40  
41 },
42 Filter => {
43 And => [ <Expression>, ... ], # OPTIONAL
44 CostCategories => {
45 Key => 'MyCostCategoryName', # min: 1, max: 50; OPTIONAL
46 MatchOptions => [
47 'EQUALS',
48 ... # values: EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE
49 ], # OPTIONAL
50 Values => [
51 'MyValue', ... # max: 1024
52 ], # OPTIONAL
53 }, # OPTIONAL
54 Dimensions => {
55 Key => 'AZ'
56 , # 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
57 MatchOptions => [
58 'EQUALS',
59 ... # values: EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE
60 ], # OPTIONAL
61 Values => [
62 'MyValue', ... # max: 1024
63 ], # OPTIONAL
64 }, # OPTIONAL
65 Not => <Expression>,
66 Or => [ <Expression>, ... ], # OPTIONAL
67 Tags => {
68 Key => 'MyTagKey', # max: 1024; OPTIONAL
69 MatchOptions => [
70 'EQUALS',
71 ... # values: EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE
72 ], # OPTIONAL
73 Values => [
74 'MyValue', ... # max: 1024
75 ], # OPTIONAL
76 }, # OPTIONAL
77 }, # OPTIONAL
78 PredictionIntervalLevel => 1, # OPTIONAL
79 );
80  
81 # Results:
82 my $ForecastResultsByTime =
83 $GetUsageForecastResponse->ForecastResultsByTime;
84 my $Total = $GetUsageForecastResponse->Total;
85  
86 # Returns a L<Paws::CostExplorer::GetUsageForecastResponse> object.
87  
88 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.
89 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ce/GetUsageForecast>
90  
91 =head1 ATTRIBUTES
92  
93  
94 =head2 Filter => L<Paws::CostExplorer::Expression>
95  
96 The filters that you want to use to filter your forecast. The
97 C<GetUsageForecast> API supports filtering by the following dimensions:
98  
99 =over
100  
101 =item *
102  
103 C<AZ>
104  
105 =item *
106  
107 C<INSTANCE_TYPE>
108  
109 =item *
110  
111 C<LINKED_ACCOUNT>
112  
113 =item *
114  
115 C<LINKED_ACCOUNT_NAME>
116  
117 =item *
118  
119 C<OPERATION>
120  
121 =item *
122  
123 C<PURCHASE_TYPE>
124  
125 =item *
126  
127 C<REGION>
128  
129 =item *
130  
131 C<SERVICE>
132  
133 =item *
134  
135 C<USAGE_TYPE>
136  
137 =item *
138  
139 C<USAGE_TYPE_GROUP>
140  
141 =item *
142  
143 C<RECORD_TYPE>
144  
145 =item *
146  
147 C<OPERATING_SYSTEM>
148  
149 =item *
150  
151 C<TENANCY>
152  
153 =item *
154  
155 C<SCOPE>
156  
157 =item *
158  
159 C<PLATFORM>
160  
161 =item *
162  
163 C<SUBSCRIPTION_ID>
164  
165 =item *
166  
167 C<LEGAL_ENTITY_NAME>
168  
169 =item *
170  
171 C<DEPLOYMENT_OPTION>
172  
173 =item *
174  
175 C<DATABASE_ENGINE>
176  
177 =item *
178  
179 C<INSTANCE_TYPE_FAMILY>
180  
181 =item *
182  
183 C<BILLING_ENTITY>
184  
185 =item *
186  
187 C<RESERVATION_ID>
188  
189 =item *
190  
191 C<SAVINGS_PLAN_ARN>
192  
193 =back
194  
195  
196  
197  
198 =head2 B<REQUIRED> Granularity => Str
199  
200 How granular you want the forecast to be. You can get 3 months of
201 C<DAILY> forecasts or 12 months of C<MONTHLY> forecasts.
202  
203 The C<GetUsageForecast> operation supports only C<DAILY> and C<MONTHLY>
204 granularities.
205  
206 Valid values are: C<"DAILY">, C<"MONTHLY">, C<"HOURLY">
207  
208 =head2 B<REQUIRED> Metric => Str
209  
210 Which metric Cost Explorer uses to create your forecast.
211  
212 Valid values for a C<GetUsageForecast> call are the following:
213  
214 =over
215  
216 =item *
217  
218 USAGE_QUANTITY
219  
220 =item *
221  
222 NORMALIZED_USAGE_AMOUNT
223  
224 =back
225  
226  
227 Valid values are: C<"BLENDED_COST">, C<"UNBLENDED_COST">, C<"AMORTIZED_COST">, C<"NET_UNBLENDED_COST">, C<"NET_AMORTIZED_COST">, C<"USAGE_QUANTITY">, C<"NORMALIZED_USAGE_AMOUNT">
228  
229 =head2 PredictionIntervalLevel => Int
230  
231 Cost Explorer always returns the mean forecast as a single point. You
232 can request a prediction interval around the mean by specifying a
233 confidence level. The higher the confidence level, the more confident
234 Cost Explorer is about the actual value falling in the prediction
235 interval. Higher confidence levels result in wider prediction
236 intervals.
237  
238  
239  
240 =head2 B<REQUIRED> TimePeriod => L<Paws::CostExplorer::DateInterval>
241  
242 The start and end dates of the period that you want to retrieve usage
243 forecast for. The start date is inclusive, but the end date is
244 exclusive. For example, if C<start> is C<2017-01-01> and C<end> is
245 C<2017-05-01>, then the cost and usage data is retrieved from
246 C<2017-01-01> up to and including C<2017-04-30> but not including
247 C<2017-05-01>. The start date must be equal to or later than the
248 current date to avoid a validation error.
249  
250  
251  
252  
253 =head1 SEE ALSO
254  
255 This class forms part of L<Paws>, documenting arguments for method GetUsageForecast in L<Paws::CostExplorer>
256  
257 =head1 BUGS and CONTRIBUTIONS
258  
259 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
260  
261 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
262  
263 =cut
264