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

filter: Statementstmt 0.0% 0 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 10 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Generated by default/object.tt
2 package Paws::CostExplorer::Expression;
3 use Moose;
4 has And => (is => 'ro', isa => 'ArrayRef[Paws::CostExplorer::Expression]');
5 has CostCategories => (is => 'ro', isa => 'Paws::CostExplorer::CostCategoryValues');
6 has Dimensions => (is => 'ro', isa => 'Paws::CostExplorer::DimensionValues');
7 has Not => (is => 'ro', isa => 'Paws::CostExplorer::Expression');
8 has Or => (is => 'ro', isa => 'ArrayRef[Paws::CostExplorer::Expression]');
9 has Tags => (is => 'ro', isa => 'Paws::CostExplorer::TagValues');
10  
11 1;
12  
13 ### main pod documentation begin ###
14  
15 =head1 NAME
16  
17 Paws::CostExplorer::Expression
18  
19 =head1 USAGE
20  
21 This class represents one of two things:
22  
23 =head3 Arguments in a call to a service
24  
25 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
26 Each attribute should be used as a named argument in the calls that expect this type of object.
27  
28 As an example, if Att1 is expected to be a Paws::CostExplorer::Expression object:
29  
30 $service_obj->Method(Att1 => { And => $value, ..., Tags => $value });
31  
32 =head3 Results returned from an API call
33  
34 Use accessors for each attribute. If Att1 is expected to be an Paws::CostExplorer::Expression object:
35  
36 $result = $service_obj->Method(...);
37 $result->Att1->And
38  
39 =head1 DESCRIPTION
40  
41 Use C<Expression> to filter by cost or by usage. There are two
42 patterns:
43  
44 =over
45  
46 =item *
47  
48 Simple dimension values - You can set the dimension name and values for
49 the filters that you plan to use. For example, you can filter for
50 C<REGION==us-east-1 OR REGION==us-west-1>. For
51 C<GetRightsizingRecommendation>, the Region is a full name (for
52 example, C<REGION==US East (N. Virginia)>. The C<Expression> example
53 looks like:
54  
55 C<{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1",
56 E<ldquo>us-west-1E<rdquo> ] } }>
57  
58 The list of dimension values are OR'd together to retrieve cost or
59 usage data. You can create C<Expression> and C<DimensionValues> objects
60 using either C<with*> methods or C<set*> methods in multiple lines.
61  
62 =item *
63  
64 Compound dimension values with logical operations - You can use
65 multiple C<Expression> types and the logical operators C<AND/OR/NOT> to
66 create a list of one or more C<Expression> objects. This allows you to
67 filter on more advanced options. For example, you can filter on
68 C<((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1))
69 AND (USAGE_TYPE != DataTransfer)>. The C<Expression> for that looks
70 like this:
71  
72 C<{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [
73 "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values":
74 ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE",
75 "Values": ["DataTransfer"] }}} ] }>
76  
77 Because each C<Expression> can have only one operator, the service
78 returns an error if more than one is specified. The following example
79 shows an C<Expression> object that creates an error.
80  
81 C<{ "And": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE",
82 "Values": [ "DataTransfer" ] } }>
83  
84 =back
85  
86 For the C<GetRightsizingRecommendation> action, a combination of OR and
87 NOT is not supported. OR is not supported between different dimensions,
88 or dimensions and tags. NOT operators aren't supported. Dimensions are
89 also limited to C<LINKED_ACCOUNT>, C<REGION>, or C<RIGHTSIZING_TYPE>.
90  
91 For the C<GetReservationPurchaseRecommendation> action, only NOT is
92 supported. AND and OR are not supported. Dimensions are limited to
93 C<LINKED_ACCOUNT>.
94  
95 =head1 ATTRIBUTES
96  
97  
98 =head2 And => ArrayRef[L<Paws::CostExplorer::Expression>]
99  
100 Return results that match both C<Dimension> objects.
101  
102  
103 =head2 CostCategories => L<Paws::CostExplorer::CostCategoryValues>
104  
105 The filter based on C<CostCategory> values.
106  
107  
108 =head2 Dimensions => L<Paws::CostExplorer::DimensionValues>
109  
110 The specific C<Dimension> to use for C<Expression>.
111  
112  
113 =head2 Not => L<Paws::CostExplorer::Expression>
114  
115 Return results that don't match a C<Dimension> object.
116  
117  
118 =head2 Or => ArrayRef[L<Paws::CostExplorer::Expression>]
119  
120 Return results that match either C<Dimension> object.
121  
122  
123 =head2 Tags => L<Paws::CostExplorer::TagValues>
124  
125 The specific C<Tag> to use for C<Expression>.
126  
127  
128  
129 =head1 SEE ALSO
130  
131 This class forms part of L<Paws>, describing an object used in L<Paws::CostExplorer>
132  
133 =head1 BUGS and CONTRIBUTIONS
134  
135 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
136  
137 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
138  
139 =cut
140