blib/lib/Paws/ResourceTagging/GetResources.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::ResourceTagging::GetResources;
3 use Moose;
4 has ExcludeCompliantResources => (is => 'ro', isa => 'Bool');
5 has IncludeComplianceDetails => (is => 'ro', isa => 'Bool');
6 has PaginationToken => (is => 'ro', isa => 'Str');
7 has ResourceARNList => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
8 has ResourcesPerPage => (is => 'ro', isa => 'Int');
9 has ResourceTypeFilters => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
10 has TagFilters => (is => 'ro', isa => 'ArrayRef[Paws::ResourceTagging::TagFilter]');
11 has TagsPerPage => (is => 'ro', isa => 'Int');
12  
13 use MooseX::ClassAttribute;
14  
15 class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetResources');
16 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ResourceTagging::GetResourcesOutput');
17 class_has _result_key => (isa => 'Str', is => 'ro');
18 1;
19  
20 ### main pod documentation begin ###
21  
22 =head1 NAME
23  
24 Paws::ResourceTagging::GetResources - Arguments for method GetResources on L<Paws::ResourceTagging>
25  
26 =head1 DESCRIPTION
27  
28 This class represents the parameters used for calling the method GetResources on the
29 L<AWS Resource Groups Tagging API|Paws::ResourceTagging> service. Use the attributes of this class
30 as arguments to method GetResources.
31  
32 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetResources.
33  
34 =head1 SYNOPSIS
35  
36 my $tagging = Paws->service('ResourceTagging');
37 my $GetResourcesOutput = $tagging->GetResources(
38 ExcludeCompliantResources => 1, # OPTIONAL
39 IncludeComplianceDetails => 1, # OPTIONAL
40 PaginationToken => 'MyPaginationToken', # OPTIONAL
41 ResourceARNList => [
42 'MyResourceARN', ... # min: 1, max: 1011
43 ], # OPTIONAL
44 ResourceTypeFilters => [
45 'MyAmazonResourceType', ... # max: 256
46 ], # OPTIONAL
47 ResourcesPerPage => 1, # OPTIONAL
48 TagFilters => [
49 {
50 Key => 'MyTagKey', # min: 1, max: 128; OPTIONAL
51 Values => [
52 'MyTagValue', ... # max: 256
53 ], # max: 20; OPTIONAL
54 },
55 ...
56 ], # OPTIONAL
57 TagsPerPage => 1, # OPTIONAL
58 );
59  
60 # Results:
61 my $PaginationToken = $GetResourcesOutput->PaginationToken;
62 my $ResourceTagMappingList = $GetResourcesOutput->ResourceTagMappingList;
63  
64 # Returns a L<Paws::ResourceTagging::GetResourcesOutput> object.
65  
66 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.
67 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/tagging/GetResources>
68  
69 =head1 ATTRIBUTES
70  
71  
72 =head2 ExcludeCompliantResources => Bool
73  
74 Specifies whether to exclude resources that are compliant with the tag
75 policy. Set this to C<true> if you are interested in retrieving
76 information on noncompliant resources only.
77  
78 You can use this parameter only if the C<IncludeComplianceDetails>
79 parameter is also set to C<true>.
80  
81  
82  
83 =head2 IncludeComplianceDetails => Bool
84  
85 Specifies whether to include details regarding the compliance with the
86 effective tag policy. Set this to C<true> to determine whether
87 resources are compliant with the tag policy and to get details.
88  
89  
90  
91 =head2 PaginationToken => Str
92  
93 Specifies a C<PaginationToken> response value from a previous request
94 to indicate that you want the next page of results. Leave this
95 parameter empty in your initial request.
96  
97  
98  
99 =head2 ResourceARNList => ArrayRef[Str|Undef]
100  
101 Specifies a list of ARNs of resources for which you want to retrieve
102 tag data. You can't specify both this parameter and any of the
103 pagination parameters (C<ResourcesPerPage>, C<TagsPerPage>,
104 C<PaginationToken>) in the same request. If you specify both, you get
105 an C<Invalid Parameter> exception.
106  
107 If a resource specified by this parameter doesn't exist, it doesn't
108 generate an error; it simply isn't included in the response.
109  
110 An ARN (Amazon Resource Name) uniquely identifies a resource. For more
111 information, see Amazon Resource Names (ARNs) and AWS Service
112 Namespaces
113 (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
114 in the I<AWS General Reference>.
115  
116  
117  
118 =head2 ResourcesPerPage => Int
119  
120 Specifies the maximum number of results to be returned in each page. A
121 query can return fewer than this maximum, even if there are more
122 results still to return. You should always check the C<PaginationToken>
123 response value to see if there are more results. You can specify a
124 minimum of 1 and a maximum value of 100.
125  
126  
127  
128 =head2 ResourceTypeFilters => ArrayRef[Str|Undef]
129  
130 Specifies the resource types that you want included in the response.
131 The format of each resource type is C<service[:resourceType]>. For
132 example, specifying a resource type of C<ec2> returns all Amazon EC2
133 resources (which includes EC2 instances). Specifying a resource type of
134 C<ec2:instance> returns only EC2 instances.
135  
136 The string for each service name and resource type is the same as that
137 embedded in a resource's Amazon Resource Name (ARN). Consult the I<AWS
138 General Reference> for the following:
139  
140 For more information about ARNs, see Amazon Resource Names (ARNs) and
141 AWS Service Namespaces
142 (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
143  
144 You can specify multiple resource types by using an array. The array
145 can include up to 100 items. Note that the length constraint
146 requirement applies to each resource type filter.
147  
148  
149  
150 =head2 TagFilters => ArrayRef[L<Paws::ResourceTagging::TagFilter>]
151  
152 Specifies a list of TagFilters (keys and values) to restrict the output
153 to only those resources that have the specified tag and, if included,
154 the specified value. Each C<TagFilter> must contain a key with values
155 optional. A request can include up to 50 keys, and each key can include
156 up to 20 values.
157  
158 Note the following when deciding how to use TagFilters:
159  
160 =over
161  
162 =item *
163  
164 If you I<don't> specify a C<TagFilter>, the response includes all
165 resources that are currently tagged or ever had a tag. Resources that
166 currently don't have tags are shown with an empty tag set, like this:
167 C<"Tags": []>.
168  
169 =item *
170  
171 If you specify more than one filter in a single request, the response
172 returns only those resources that satisfy all filters.
173  
174 =item *
175  
176 If you specify a filter that contains more than one value for a key,
177 the response returns resources that match any of the specified values
178 for that key.
179  
180 =item *
181  
182 If you don't specify any values for a key, the response returns
183 resources that are tagged with that key and any or no value.
184  
185 For example, for the following filters: C<filter1= {keyA,{value1}}>,
186 C<filter2={keyB,{value2,value3,value4}}>, C<filter3= {keyC}>:
187  
188 =over
189  
190 =item *
191  
192 C<GetResources({filter1})> returns resources tagged with C<key1=value1>
193  
194 =item *
195  
196 C<GetResources({filter2})> returns resources tagged with C<key2=value2>
197 or C<key2=value3> or C<key2=value4>
198  
199 =item *
200  
201 C<GetResources({filter3})> returns resources tagged with any tag with
202 the key C<key3>, and with any or no value
203  
204 =item *
205  
206 C<GetResources({filter1,filter2,filter3})> returns resources tagged
207 with C<(key1=value1) and (key2=value2 or key2=value3 or key2=value4)
208 and (key3, any or no value)>
209  
210 =back
211  
212 =back
213  
214  
215  
216  
217 =head2 TagsPerPage => Int
218  
219 AWS recommends using C<ResourcesPerPage> instead of this parameter.
220  
221 A limit that restricts the number of tags (key and value pairs)
222 returned by C<GetResources> in paginated output. A resource with no
223 tags is counted as having one tag (one key and value pair).
224  
225 C<GetResources> does not split a resource and its associated tags
226 across pages. If the specified C<TagsPerPage> would cause such a break,
227 a C<PaginationToken> is returned in place of the affected resource and
228 its tags. Use that token in another request to get the remaining data.
229 For example, if you specify a C<TagsPerPage> of C<100> and the account
230 has 22 resources with 10 tags each (meaning that each resource has 10
231 key and value pairs), the output will consist of three pages. The first
232 page displays the first 10 resources, each with its 10 tags. The second
233 page displays the next 10 resources, each with its 10 tags. The third
234 page displays the remaining 2 resources, each with its 10 tags.
235  
236 You can set C<TagsPerPage> to a minimum of 100 items up to a maximum of
237 500 items.
238  
239  
240  
241  
242 =head1 SEE ALSO
243  
244 This class forms part of L<Paws>, documenting arguments for method GetResources in L<Paws::ResourceTagging>
245  
246 =head1 BUGS and CONTRIBUTIONS
247  
248 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
249  
250 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
251  
252 =cut
253