blib/lib/Paws/ResourceTagging.pm untested

filter: Statementstmt 0.0% 0 / 119 Branchbran 0.0% 0 / 16 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 19 Podpod 0.0% 0 / 18 totaltotal 0.0% 0 / 172 CC 9 SCAR 18.6
CC
9
Cov
0%
GetAllComplianceSummary
12.0
GetAllResources
12.0
GetAllTagKeys
12.0
CRAP 6.4
1 package Paws::ResourceTagging;
2 use Moose;
3 sub service { 'tagging' }
4 sub signing_name { 'tagging' }
5 sub version { '2017-01-26' }
6 sub target_prefix { 'ResourceGroupsTaggingAPI_20170126' }
7 sub json_version { "1.1" }
8 has max_attempts => (is => 'ro', isa => 'Int', default => 5);
9 has retry => (is => 'ro', isa => 'HashRef', default => sub {
10 { base => 'rand', type => 'exponential', growth_factor => 2 }
11 });
12 has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
13 ] });
14  
15 with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller';
16  
17
18 sub DescribeReportCreation {
19 my $self = shift;
20 my $call_object = $self->new_with_coercions('Paws::ResourceTagging::DescribeReportCreation', @_);
21 return $self->caller->do_call($self, $call_object);
22 }
23 sub GetComplianceSummary {
24 my $self = shift;
25 my $call_object = $self->new_with_coercions('Paws::ResourceTagging::GetComplianceSummary', @_);
26 return $self->caller->do_call($self, $call_object);
27 }
28 sub GetResources {
29 my $self = shift;
30 my $call_object = $self->new_with_coercions('Paws::ResourceTagging::GetResources', @_);
31 return $self->caller->do_call($self, $call_object);
32 }
33 sub GetTagKeys {
34 my $self = shift;
35 my $call_object = $self->new_with_coercions('Paws::ResourceTagging::GetTagKeys', @_);
36 return $self->caller->do_call($self, $call_object);
37 }
38 sub GetTagValues {
39 my $self = shift;
40 my $call_object = $self->new_with_coercions('Paws::ResourceTagging::GetTagValues', @_);
41 return $self->caller->do_call($self, $call_object);
42 }
43 sub StartReportCreation {
44 my $self = shift;
45 my $call_object = $self->new_with_coercions('Paws::ResourceTagging::StartReportCreation', @_);
46 return $self->caller->do_call($self, $call_object);
47 }
48 sub TagResources {
49 my $self = shift;
50 my $call_object = $self->new_with_coercions('Paws::ResourceTagging::TagResources', @_);
51 return $self->caller->do_call($self, $call_object);
52 }
53 sub UntagResources {
54 my $self = shift;
55 my $call_object = $self->new_with_coercions('Paws::ResourceTagging::UntagResources', @_);
56 return $self->caller->do_call($self, $call_object);
57 }
58
59 sub GetAllComplianceSummary {
60 my $self = shift;
61  
62 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
63 my $result = $self->GetComplianceSummary(@_);
64 my $next_result = $result;
65  
66 if (not defined $callback) {
67 while ($next_result->PaginationToken) {
68 $next_result = $self->GetComplianceSummary(@_, PaginationToken => $next_result->PaginationToken);
69 push @{ $result->SummaryList }, @{ $next_result->SummaryList };
70 }
71 return $result;
72 } else {
73 while ($result->PaginationToken) {
74 $callback->($_ => 'SummaryList') foreach (@{ $result->SummaryList });
75 $result = $self->GetComplianceSummary(@_, PaginationToken => $result->PaginationToken);
76 }
77 $callback->($_ => 'SummaryList') foreach (@{ $result->SummaryList });
78 }
79  
80 return undef
81 }
82 sub GetAllResources {
83 my $self = shift;
84  
85 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
86 my $result = $self->GetResources(@_);
87 my $next_result = $result;
88  
89 if (not defined $callback) {
90 while ($next_result->PaginationToken) {
91 $next_result = $self->GetResources(@_, PaginationToken => $next_result->PaginationToken);
92 push @{ $result->ResourceTagMappingList }, @{ $next_result->ResourceTagMappingList };
93 }
94 return $result;
95 } else {
96 while ($result->PaginationToken) {
97 $callback->($_ => 'ResourceTagMappingList') foreach (@{ $result->ResourceTagMappingList });
98 $result = $self->GetResources(@_, PaginationToken => $result->PaginationToken);
99 }
100 $callback->($_ => 'ResourceTagMappingList') foreach (@{ $result->ResourceTagMappingList });
101 }
102  
103 return undef
104 }
105 sub GetAllTagKeys {
106 my $self = shift;
107  
108 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
109 my $result = $self->GetTagKeys(@_);
110 my $next_result = $result;
111  
112 if (not defined $callback) {
113 while ($next_result->PaginationToken) {
114 $next_result = $self->GetTagKeys(@_, PaginationToken => $next_result->PaginationToken);
115 push @{ $result->TagKeys }, @{ $next_result->TagKeys };
116 }
117 return $result;
118 } else {
119 while ($result->PaginationToken) {
120 $callback->($_ => 'TagKeys') foreach (@{ $result->TagKeys });
121 $result = $self->GetTagKeys(@_, PaginationToken => $result->PaginationToken);
122 }
123 $callback->($_ => 'TagKeys') foreach (@{ $result->TagKeys });
124 }
125  
126 return undef
127 }
128 sub GetAllTagValues {
129 my $self = shift;
130  
131 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
132 my $result = $self->GetTagValues(@_);
133 my $next_result = $result;
134  
135 if (not defined $callback) {
136 while ($next_result->PaginationToken) {
137 $next_result = $self->GetTagValues(@_, PaginationToken => $next_result->PaginationToken);
138 push @{ $result->TagValues }, @{ $next_result->TagValues };
139 }
140 return $result;
141 } else {
142 while ($result->PaginationToken) {
143 $callback->($_ => 'TagValues') foreach (@{ $result->TagValues });
144 $result = $self->GetTagValues(@_, PaginationToken => $result->PaginationToken);
145 }
146 $callback->($_ => 'TagValues') foreach (@{ $result->TagValues });
147 }
148  
149 return undef
150 }
151  
152  
153 sub operations { qw/DescribeReportCreation GetComplianceSummary GetResources GetTagKeys GetTagValues StartReportCreation TagResources UntagResources / }
154  
155 1;
156  
157 ### main pod documentation begin ###
158  
159 =head1 NAME
160  
161 Paws::ResourceTagging - Perl Interface to AWS AWS Resource Groups Tagging API
162  
163 =head1 SYNOPSIS
164  
165 use Paws;
166  
167 my $obj = Paws->service('ResourceTagging');
168 my $res = $obj->Method(
169 Arg1 => $val1,
170 Arg2 => [ 'V1', 'V2' ],
171 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
172 # of the arguments type
173 Arg3 => { Att1 => 'Val1' },
174 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
175 # the constructor of the arguments type
176 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
177 );
178  
179 =head1 DESCRIPTION
180  
181 Resource Groups Tagging API
182  
183 For the AWS API documentation, see L<https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/Welcome.html>
184  
185  
186 =head1 METHODS
187  
188 =head2 DescribeReportCreation
189  
190  
191  
192  
193  
194  
195 Each argument is described in detail in: L<Paws::ResourceTagging::DescribeReportCreation>
196  
197 Returns: a L<Paws::ResourceTagging::DescribeReportCreationOutput> instance
198  
199 Describes the status of the C<StartReportCreation> operation.
200  
201 You can call this operation only from the organization's management
202 account and from the us-east-1 Region.
203  
204  
205 =head2 GetComplianceSummary
206  
207 =over
208  
209 =item [GroupBy => ArrayRef[Str|Undef]]
210  
211 =item [MaxResults => Int]
212  
213 =item [PaginationToken => Str]
214  
215 =item [RegionFilters => ArrayRef[Str|Undef]]
216  
217 =item [ResourceTypeFilters => ArrayRef[Str|Undef]]
218  
219 =item [TagKeyFilters => ArrayRef[Str|Undef]]
220  
221 =item [TargetIdFilters => ArrayRef[Str|Undef]]
222  
223  
224 =back
225  
226 Each argument is described in detail in: L<Paws::ResourceTagging::GetComplianceSummary>
227  
228 Returns: a L<Paws::ResourceTagging::GetComplianceSummaryOutput> instance
229  
230 Returns a table that shows counts of resources that are noncompliant
231 with their tag policies.
232  
233 For more information on tag policies, see Tag Policies
234 (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
235 in the I<AWS Organizations User Guide.>
236  
237 You can call this operation only from the organization's management
238 account and from the us-east-1 Region.
239  
240 This operation supports pagination, where the response can be sent in
241 multiple pages. You should check the C<PaginationToken> response
242 parameter to determine if there are additional results available to
243 return. Repeat the query, passing the C<PaginationToken> response
244 parameter value as an input to the next request until you recieve a
245 C<null> value. A null value for C<PaginationToken> indicates that there
246 are no more results waiting to be returned.
247  
248  
249 =head2 GetResources
250  
251 =over
252  
253 =item [ExcludeCompliantResources => Bool]
254  
255 =item [IncludeComplianceDetails => Bool]
256  
257 =item [PaginationToken => Str]
258  
259 =item [ResourceARNList => ArrayRef[Str|Undef]]
260  
261 =item [ResourcesPerPage => Int]
262  
263 =item [ResourceTypeFilters => ArrayRef[Str|Undef]]
264  
265 =item [TagFilters => ArrayRef[L<Paws::ResourceTagging::TagFilter>]]
266  
267 =item [TagsPerPage => Int]
268  
269  
270 =back
271  
272 Each argument is described in detail in: L<Paws::ResourceTagging::GetResources>
273  
274 Returns: a L<Paws::ResourceTagging::GetResourcesOutput> instance
275  
276 Returns all the tagged or previously tagged resources that are located
277 in the specified Region for the AWS account.
278  
279 Depending on what information you want returned, you can also specify
280 the following:
281  
282 =over
283  
284 =item *
285  
286 I<Filters> that specify what tags and resource types you want returned.
287 The response includes all tags that are associated with the requested
288 resources.
289  
290 =item *
291  
292 Information about compliance with the account's effective tag policy.
293 For more information on tag policies, see Tag Policies
294 (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
295 in the I<AWS Organizations User Guide.>
296  
297 =back
298  
299 This operation supports pagination, where the response can be sent in
300 multiple pages. You should check the C<PaginationToken> response
301 parameter to determine if there are additional results available to
302 return. Repeat the query, passing the C<PaginationToken> response
303 parameter value as an input to the next request until you recieve a
304 C<null> value. A null value for C<PaginationToken> indicates that there
305 are no more results waiting to be returned.
306  
307  
308 =head2 GetTagKeys
309  
310 =over
311  
312 =item [PaginationToken => Str]
313  
314  
315 =back
316  
317 Each argument is described in detail in: L<Paws::ResourceTagging::GetTagKeys>
318  
319 Returns: a L<Paws::ResourceTagging::GetTagKeysOutput> instance
320  
321 Returns all tag keys currently in use in the specified Region for the
322 calling AWS account.
323  
324 This operation supports pagination, where the response can be sent in
325 multiple pages. You should check the C<PaginationToken> response
326 parameter to determine if there are additional results available to
327 return. Repeat the query, passing the C<PaginationToken> response
328 parameter value as an input to the next request until you recieve a
329 C<null> value. A null value for C<PaginationToken> indicates that there
330 are no more results waiting to be returned.
331  
332  
333 =head2 GetTagValues
334  
335 =over
336  
337 =item Key => Str
338  
339 =item [PaginationToken => Str]
340  
341  
342 =back
343  
344 Each argument is described in detail in: L<Paws::ResourceTagging::GetTagValues>
345  
346 Returns: a L<Paws::ResourceTagging::GetTagValuesOutput> instance
347  
348 Returns all tag values for the specified key that are used in the
349 specified AWS Region for the calling AWS account.
350  
351 This operation supports pagination, where the response can be sent in
352 multiple pages. You should check the C<PaginationToken> response
353 parameter to determine if there are additional results available to
354 return. Repeat the query, passing the C<PaginationToken> response
355 parameter value as an input to the next request until you recieve a
356 C<null> value. A null value for C<PaginationToken> indicates that there
357 are no more results waiting to be returned.
358  
359  
360 =head2 StartReportCreation
361  
362 =over
363  
364 =item S3Bucket => Str
365  
366  
367 =back
368  
369 Each argument is described in detail in: L<Paws::ResourceTagging::StartReportCreation>
370  
371 Returns: a L<Paws::ResourceTagging::StartReportCreationOutput> instance
372  
373 Generates a report that lists all tagged resources in the accounts
374 across your organization and tells whether each resource is compliant
375 with the effective tag policy. Compliance data is refreshed daily. The
376 report is generated asynchronously.
377  
378 The generated report is saved to the following location:
379  
380 C<s3://example-bucket/AwsTagPolicies/o-exampleorgid/YYYY-MM-ddTHH:mm:ssZ/report.csv>
381  
382 You can call this operation only from the organization's management
383 account and from the us-east-1 Region.
384  
385  
386 =head2 TagResources
387  
388 =over
389  
390 =item ResourceARNList => ArrayRef[Str|Undef]
391  
392 =item Tags => L<Paws::ResourceTagging::TagMap>
393  
394  
395 =back
396  
397 Each argument is described in detail in: L<Paws::ResourceTagging::TagResources>
398  
399 Returns: a L<Paws::ResourceTagging::TagResourcesOutput> instance
400  
401 Applies one or more tags to the specified resources. Note the
402 following:
403  
404 =over
405  
406 =item *
407  
408 Not all resources can have tags. For a list of services with resources
409 that support tagging using this operation, see Services that support
410 the Resource Groups Tagging API
411 (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/supported-services.html).
412  
413 =item *
414  
415 Each resource can have up to 50 tags. For other limits, see Tag Naming
416 and Usage Conventions
417 (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html#tag-conventions)
418 in the I<AWS General Reference.>
419  
420 =item *
421  
422 You can only tag resources that are located in the specified AWS Region
423 for the AWS account.
424  
425 =item *
426  
427 To add tags to a resource, you need the necessary permissions for the
428 service that the resource belongs to as well as permissions for adding
429 tags. For more information, see the documentation for each service.
430  
431 =back
432  
433 Do not store personally identifiable information (PII) or other
434 confidential or sensitive information in tags. We use tags to provide
435 you with billing and administration services. Tags are not intended to
436 be used for private or sensitive data.
437  
438  
439 =head2 UntagResources
440  
441 =over
442  
443 =item ResourceARNList => ArrayRef[Str|Undef]
444  
445 =item TagKeys => ArrayRef[Str|Undef]
446  
447  
448 =back
449  
450 Each argument is described in detail in: L<Paws::ResourceTagging::UntagResources>
451  
452 Returns: a L<Paws::ResourceTagging::UntagResourcesOutput> instance
453  
454 Removes the specified tags from the specified resources. When you
455 specify a tag key, the action removes both that key and its associated
456 value. The operation succeeds even if you attempt to remove tags from a
457 resource that were already removed. Note the following:
458  
459 =over
460  
461 =item *
462  
463 To remove tags from a resource, you need the necessary permissions for
464 the service that the resource belongs to as well as permissions for
465 removing tags. For more information, see the documentation for the
466 service whose resource you want to untag.
467  
468 =item *
469  
470 You can only tag resources that are located in the specified AWS Region
471 for the calling AWS account.
472  
473 =back
474  
475  
476  
477  
478  
479 =head1 PAGINATORS
480  
481 Paginator methods are helpers that repetively call methods that return partial results
482  
483 =head2 GetAllComplianceSummary(sub { },[GroupBy => ArrayRef[Str|Undef], MaxResults => Int, PaginationToken => Str, RegionFilters => ArrayRef[Str|Undef], ResourceTypeFilters => ArrayRef[Str|Undef], TagKeyFilters => ArrayRef[Str|Undef], TargetIdFilters => ArrayRef[Str|Undef]])
484  
485 =head2 GetAllComplianceSummary([GroupBy => ArrayRef[Str|Undef], MaxResults => Int, PaginationToken => Str, RegionFilters => ArrayRef[Str|Undef], ResourceTypeFilters => ArrayRef[Str|Undef], TagKeyFilters => ArrayRef[Str|Undef], TargetIdFilters => ArrayRef[Str|Undef]])
486  
487  
488 If passed a sub as first parameter, it will call the sub for each element found in :
489  
490 - SummaryList, passing the object as the first parameter, and the string 'SummaryList' as the second parameter
491  
492 If not, it will return a a L<Paws::ResourceTagging::GetComplianceSummaryOutput> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
493  
494  
495 =head2 GetAllResources(sub { },[ExcludeCompliantResources => Bool, IncludeComplianceDetails => Bool, PaginationToken => Str, ResourceARNList => ArrayRef[Str|Undef], ResourcesPerPage => Int, ResourceTypeFilters => ArrayRef[Str|Undef], TagFilters => ArrayRef[L<Paws::ResourceTagging::TagFilter>], TagsPerPage => Int])
496  
497 =head2 GetAllResources([ExcludeCompliantResources => Bool, IncludeComplianceDetails => Bool, PaginationToken => Str, ResourceARNList => ArrayRef[Str|Undef], ResourcesPerPage => Int, ResourceTypeFilters => ArrayRef[Str|Undef], TagFilters => ArrayRef[L<Paws::ResourceTagging::TagFilter>], TagsPerPage => Int])
498  
499  
500 If passed a sub as first parameter, it will call the sub for each element found in :
501  
502 - ResourceTagMappingList, passing the object as the first parameter, and the string 'ResourceTagMappingList' as the second parameter
503  
504 If not, it will return a a L<Paws::ResourceTagging::GetResourcesOutput> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
505  
506  
507 =head2 GetAllTagKeys(sub { },[PaginationToken => Str])
508  
509 =head2 GetAllTagKeys([PaginationToken => Str])
510  
511  
512 If passed a sub as first parameter, it will call the sub for each element found in :
513  
514 - TagKeys, passing the object as the first parameter, and the string 'TagKeys' as the second parameter
515  
516 If not, it will return a a L<Paws::ResourceTagging::GetTagKeysOutput> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
517  
518  
519 =head2 GetAllTagValues(sub { },Key => Str, [PaginationToken => Str])
520  
521 =head2 GetAllTagValues(Key => Str, [PaginationToken => Str])
522  
523  
524 If passed a sub as first parameter, it will call the sub for each element found in :
525  
526 - TagValues, passing the object as the first parameter, and the string 'TagValues' as the second parameter
527  
528 If not, it will return a a L<Paws::ResourceTagging::GetTagValuesOutput> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
529  
530  
531  
532  
533  
534 =head1 SEE ALSO
535  
536 This service class forms part of L<Paws>
537  
538 =head1 BUGS and CONTRIBUTIONS
539  
540 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
541  
542 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
543  
544 =cut
545