blib/lib/Paws/CostExplorer/GetDimensionValues.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::GetDimensionValues;
3 use Moose;
4 has Context => (is => 'ro', isa => 'Str');
5 has Dimension => (is => 'ro', isa => 'Str', required => 1);
6 has Filter => (is => 'ro', isa => 'Paws::CostExplorer::Expression');
7 has MaxResults => (is => 'ro', isa => 'Int');
8 has NextPageToken => (is => 'ro', isa => 'Str');
9 has SearchString => (is => 'ro', isa => 'Str');
10 has SortBy => (is => 'ro', isa => 'ArrayRef[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 => 'GetDimensionValues');
16 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CostExplorer::GetDimensionValuesResponse');
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::GetDimensionValues - Arguments for method GetDimensionValues on L<Paws::CostExplorer>
25  
26 =head1 DESCRIPTION
27  
28 This class represents the parameters used for calling the method GetDimensionValues on the
29 L<AWS Cost Explorer Service|Paws::CostExplorer> service. Use the attributes of this class
30 as arguments to method GetDimensionValues.
31  
32 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetDimensionValues.
33  
34 =head1 SYNOPSIS
35  
36 my $ce = Paws->service('CostExplorer');
37 my $GetDimensionValuesResponse = $ce->GetDimensionValues(
38 Dimension => 'AZ',
39 TimePeriod => {
40 End => 'MyYearMonthDay', # max: 40
41 Start => 'MyYearMonthDay', # max: 40
42  
43 },
44 Context => 'COST_AND_USAGE', # OPTIONAL
45 Filter => {
46 And => [ <Expression>, ... ], # OPTIONAL
47 CostCategories => {
48 Key => 'MyCostCategoryName', # min: 1, max: 50; OPTIONAL
49 MatchOptions => [
50 'EQUALS',
51 ... # values: EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE
52 ], # OPTIONAL
53 Values => [
54 'MyValue', ... # max: 1024
55 ], # OPTIONAL
56 }, # OPTIONAL
57 Dimensions => {
58 Key => 'AZ'
59 , # 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
60 MatchOptions => [
61 'EQUALS',
62 ... # values: EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE
63 ], # OPTIONAL
64 Values => [
65 'MyValue', ... # max: 1024
66 ], # OPTIONAL
67 }, # OPTIONAL
68 Not => <Expression>,
69 Or => [ <Expression>, ... ], # OPTIONAL
70 Tags => {
71 Key => 'MyTagKey', # max: 1024; OPTIONAL
72 MatchOptions => [
73 'EQUALS',
74 ... # values: EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE
75 ], # OPTIONAL
76 Values => [
77 'MyValue', ... # max: 1024
78 ], # OPTIONAL
79 }, # OPTIONAL
80 }, # OPTIONAL
81 MaxResults => 1, # OPTIONAL
82 NextPageToken => 'MyNextPageToken', # OPTIONAL
83 SearchString => 'MySearchString', # OPTIONAL
84 SortBy => [
85 {
86 Key => 'MySortDefinitionKey', # max: 1024
87 SortOrder => 'ASCENDING', # values: ASCENDING, DESCENDING; OPTIONAL
88 },
89 ...
90 ], # OPTIONAL
91 );
92  
93 # Results:
94 my $DimensionValues = $GetDimensionValuesResponse->DimensionValues;
95 my $NextPageToken = $GetDimensionValuesResponse->NextPageToken;
96 my $ReturnSize = $GetDimensionValuesResponse->ReturnSize;
97 my $TotalSize = $GetDimensionValuesResponse->TotalSize;
98  
99 # Returns a L<Paws::CostExplorer::GetDimensionValuesResponse> object.
100  
101 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.
102 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ce/GetDimensionValues>
103  
104 =head1 ATTRIBUTES
105  
106  
107 =head2 Context => Str
108  
109 The context for the call to C<GetDimensionValues>. This can be
110 C<RESERVATIONS> or C<COST_AND_USAGE>. The default value is
111 C<COST_AND_USAGE>. If the context is set to C<RESERVATIONS>, the
112 resulting dimension values can be used in the
113 C<GetReservationUtilization> operation. If the context is set to
114 C<COST_AND_USAGE>, the resulting dimension values can be used in the
115 C<GetCostAndUsage> operation.
116  
117 If you set the context to C<COST_AND_USAGE>, you can use the following
118 dimensions for searching:
119  
120 =over
121  
122 =item *
123  
124 AZ - The Availability Zone. An example is C<us-east-1a>.
125  
126 =item *
127  
128 DATABASE_ENGINE - The Amazon Relational Database Service database.
129 Examples are Aurora or MySQL.
130  
131 =item *
132  
133 INSTANCE_TYPE - The type of Amazon EC2 instance. An example is
134 C<m4.xlarge>.
135  
136 =item *
137  
138 LEGAL_ENTITY_NAME - The name of the organization that sells you AWS
139 services, such as Amazon Web Services.
140  
141 =item *
142  
143 LINKED_ACCOUNT - The description in the attribute map that includes the
144 full name of the member account. The value field contains the AWS ID of
145 the member account.
146  
147 =item *
148  
149 OPERATING_SYSTEM - The operating system. Examples are Windows or Linux.
150  
151 =item *
152  
153 OPERATION - The action performed. Examples include C<RunInstance> and
154 C<CreateBucket>.
155  
156 =item *
157  
158 PLATFORM - The Amazon EC2 operating system. Examples are Windows or
159 Linux.
160  
161 =item *
162  
163 PURCHASE_TYPE - The reservation type of the purchase to which this
164 usage is related. Examples include On-Demand Instances and Standard
165 Reserved Instances.
166  
167 =item *
168  
169 SERVICE - The AWS service such as Amazon DynamoDB.
170  
171 =item *
172  
173 USAGE_TYPE - The type of usage. An example is DataTransfer-In-Bytes.
174 The response for the C<GetDimensionValues> operation includes a unit
175 attribute. Examples include GB and Hrs.
176  
177 =item *
178  
179 USAGE_TYPE_GROUP - The grouping of common usage types. An example is
180 Amazon EC2: CloudWatch E<ndash> Alarms. The response for this operation
181 includes a unit attribute.
182  
183 =item *
184  
185 REGION - The AWS Region.
186  
187 =item *
188  
189 RECORD_TYPE - The different types of charges such as RI fees, usage
190 costs, tax refunds, and credits.
191  
192 =item *
193  
194 RESOURCE_ID - The unique identifier of the resource. ResourceId is an
195 opt-in feature only available for last 14 days for EC2-Compute Service.
196  
197 =back
198  
199 If you set the context to C<RESERVATIONS>, you can use the following
200 dimensions for searching:
201  
202 =over
203  
204 =item *
205  
206 AZ - The Availability Zone. An example is C<us-east-1a>.
207  
208 =item *
209  
210 CACHE_ENGINE - The Amazon ElastiCache operating system. Examples are
211 Windows or Linux.
212  
213 =item *
214  
215 DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service
216 deployments. Valid values are C<SingleAZ> and C<MultiAZ>.
217  
218 =item *
219  
220 INSTANCE_TYPE - The type of Amazon EC2 instance. An example is
221 C<m4.xlarge>.
222  
223 =item *
224  
225 LINKED_ACCOUNT - The description in the attribute map that includes the
226 full name of the member account. The value field contains the AWS ID of
227 the member account.
228  
229 =item *
230  
231 PLATFORM - The Amazon EC2 operating system. Examples are Windows or
232 Linux.
233  
234 =item *
235  
236 REGION - The AWS Region.
237  
238 =item *
239  
240 SCOPE (Utilization only) - The scope of a Reserved Instance (RI).
241 Values are regional or a single Availability Zone.
242  
243 =item *
244  
245 TAG (Coverage only) - The tags that are associated with a Reserved
246 Instance (RI).
247  
248 =item *
249  
250 TENANCY - The tenancy of a resource. Examples are shared or dedicated.
251  
252 =back
253  
254 If you set the context to C<SAVINGS_PLANS>, you can use the following
255 dimensions for searching:
256  
257 =over
258  
259 =item *
260  
261 SAVINGS_PLANS_TYPE - Type of Savings Plans (EC2 Instance or Compute)
262  
263 =item *
264  
265 PAYMENT_OPTION - Payment option for the given Savings Plans (for
266 example, All Upfront)
267  
268 =item *
269  
270 REGION - The AWS Region.
271  
272 =item *
273  
274 INSTANCE_TYPE_FAMILY - The family of instances (For example, C<m5>)
275  
276 =item *
277  
278 LINKED_ACCOUNT - The description in the attribute map that includes the
279 full name of the member account. The value field contains the AWS ID of
280 the member account.
281  
282 =item *
283  
284 SAVINGS_PLAN_ARN - The unique identifier for your Savings Plan
285  
286 =back
287  
288  
289 Valid values are: C<"COST_AND_USAGE">, C<"RESERVATIONS">, C<"SAVINGS_PLANS">
290  
291 =head2 B<REQUIRED> Dimension => Str
292  
293 The name of the dimension. Each C<Dimension> is available for a
294 different C<Context>. For more information, see C<Context>.
295  
296 Valid values are: C<"AZ">, C<"INSTANCE_TYPE">, C<"LINKED_ACCOUNT">, C<"LINKED_ACCOUNT_NAME">, C<"OPERATION">, C<"PURCHASE_TYPE">, C<"REGION">, C<"SERVICE">, C<"SERVICE_CODE">, C<"USAGE_TYPE">, C<"USAGE_TYPE_GROUP">, C<"RECORD_TYPE">, C<"OPERATING_SYSTEM">, C<"TENANCY">, C<"SCOPE">, C<"PLATFORM">, C<"SUBSCRIPTION_ID">, C<"LEGAL_ENTITY_NAME">, C<"DEPLOYMENT_OPTION">, C<"DATABASE_ENGINE">, C<"CACHE_ENGINE">, C<"INSTANCE_TYPE_FAMILY">, C<"BILLING_ENTITY">, C<"RESERVATION_ID">, C<"RESOURCE_ID">, C<"RIGHTSIZING_TYPE">, C<"SAVINGS_PLANS_TYPE">, C<"SAVINGS_PLAN_ARN">, C<"PAYMENT_OPTION">, C<"AGREEMENT_END_DATE_TIME_AFTER">, C<"AGREEMENT_END_DATE_TIME_BEFORE">
297  
298 =head2 Filter => L<Paws::CostExplorer::Expression>
299  
300  
301  
302  
303  
304 =head2 MaxResults => Int
305  
306 This field is only used when SortBy is provided in the request. The
307 maximum number of objects that to be returned for this request. If
308 MaxResults is not specified with SortBy, the request will return 1000
309 results as the default value for this parameter.
310  
311 For C<GetDimensionValues>, MaxResults has an upper limit of 1000.
312  
313  
314  
315 =head2 NextPageToken => Str
316  
317 The token to retrieve the next set of results. AWS provides the token
318 when the response from a previous call has more results than the
319 maximum page size.
320  
321  
322  
323 =head2 SearchString => Str
324  
325 The value that you want to search the filter values for.
326  
327  
328  
329 =head2 SortBy => ArrayRef[L<Paws::CostExplorer::SortDefinition>]
330  
331 The value by which you want to sort the data.
332  
333 The key represents cost and usage metrics. The following values are
334 supported:
335  
336 =over
337  
338 =item *
339  
340 C<BlendedCost>
341  
342 =item *
343  
344 C<UnblendedCost>
345  
346 =item *
347  
348 C<AmortizedCost>
349  
350 =item *
351  
352 C<NetAmortizedCost>
353  
354 =item *
355  
356 C<NetUnblendedCost>
357  
358 =item *
359  
360 C<UsageQuantity>
361  
362 =item *
363  
364 C<NormalizedUsageAmount>
365  
366 =back
367  
368 Supported values for C<SortOrder> are C<ASCENDING> or C<DESCENDING>.
369  
370 When you specify a C<SortBy> paramater, the context must be
371 C<COST_AND_USAGE>. Further, when using C<SortBy>, C<NextPageToken> and
372 C<SearchString> are not supported.
373  
374  
375  
376 =head2 B<REQUIRED> TimePeriod => L<Paws::CostExplorer::DateInterval>
377  
378 The start and end dates for retrieving the dimension values. The start
379 date is inclusive, but the end date is exclusive. For example, if
380 C<start> is C<2017-01-01> and C<end> is C<2017-05-01>, then the cost
381 and usage data is retrieved from C<2017-01-01> up to and including
382 C<2017-04-30> but not including C<2017-05-01>.
383  
384  
385  
386  
387 =head1 SEE ALSO
388  
389 This class forms part of L<Paws>, documenting arguments for method GetDimensionValues in L<Paws::CostExplorer>
390  
391 =head1 BUGS and CONTRIBUTIONS
392  
393 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
394  
395 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
396  
397 =cut
398