blib/lib/Paws/Macie.pm untested

filter: Statementstmt 0.0% 0 / 76 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 16 Podpod 0.0% 0 / 15 totaltotal 0.0% 0 / 115 CC 5 SCAR 16.1
CC
5
Cov
0%
ListAllMemberAccounts
12.0
ListAllS3Resources
12.0
service
2.0
CRAP 5.0
1 package Paws::Macie;
2 use Moose;
3 sub service { 'macie' }
4 sub signing_name { 'macie' }
5 sub version { '2017-12-19' }
6 sub target_prefix { 'MacieService' }
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 AssociateMemberAccount {
19 my $self = shift;
20 my $call_object = $self->new_with_coercions('Paws::Macie::AssociateMemberAccount', @_);
21 return $self->caller->do_call($self, $call_object);
22 }
23 sub AssociateS3Resources {
24 my $self = shift;
25 my $call_object = $self->new_with_coercions('Paws::Macie::AssociateS3Resources', @_);
26 return $self->caller->do_call($self, $call_object);
27 }
28 sub DisassociateMemberAccount {
29 my $self = shift;
30 my $call_object = $self->new_with_coercions('Paws::Macie::DisassociateMemberAccount', @_);
31 return $self->caller->do_call($self, $call_object);
32 }
33 sub DisassociateS3Resources {
34 my $self = shift;
35 my $call_object = $self->new_with_coercions('Paws::Macie::DisassociateS3Resources', @_);
36 return $self->caller->do_call($self, $call_object);
37 }
38 sub ListMemberAccounts {
39 my $self = shift;
40 my $call_object = $self->new_with_coercions('Paws::Macie::ListMemberAccounts', @_);
41 return $self->caller->do_call($self, $call_object);
42 }
43 sub ListS3Resources {
44 my $self = shift;
45 my $call_object = $self->new_with_coercions('Paws::Macie::ListS3Resources', @_);
46 return $self->caller->do_call($self, $call_object);
47 }
48 sub UpdateS3Resources {
49 my $self = shift;
50 my $call_object = $self->new_with_coercions('Paws::Macie::UpdateS3Resources', @_);
51 return $self->caller->do_call($self, $call_object);
52 }
53
54 sub ListAllMemberAccounts {
55 my $self = shift;
56  
57 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
58 my $result = $self->ListMemberAccounts(@_);
59 my $next_result = $result;
60  
61 if (not defined $callback) {
62 while ($next_result->nextToken) {
63 $next_result = $self->ListMemberAccounts(@_, nextToken => $next_result->nextToken);
64 push @{ $result->memberAccounts }, @{ $next_result->memberAccounts };
65 }
66 return $result;
67 } else {
68 while ($result->nextToken) {
69 $callback->($_ => 'memberAccounts') foreach (@{ $result->memberAccounts });
70 $result = $self->ListMemberAccounts(@_, nextToken => $result->nextToken);
71 }
72 $callback->($_ => 'memberAccounts') foreach (@{ $result->memberAccounts });
73 }
74  
75 return undef
76 }
77 sub ListAllS3Resources {
78 my $self = shift;
79  
80 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
81 my $result = $self->ListS3Resources(@_);
82 my $next_result = $result;
83  
84 if (not defined $callback) {
85 while ($next_result->nextToken) {
86 $next_result = $self->ListS3Resources(@_, nextToken => $next_result->nextToken);
87 push @{ $result->s3Resources }, @{ $next_result->s3Resources };
88 }
89 return $result;
90 } else {
91 while ($result->nextToken) {
92 $callback->($_ => 's3Resources') foreach (@{ $result->s3Resources });
93 $result = $self->ListS3Resources(@_, nextToken => $result->nextToken);
94 }
95 $callback->($_ => 's3Resources') foreach (@{ $result->s3Resources });
96 }
97  
98 return undef
99 }
100  
101  
102 sub operations { qw/AssociateMemberAccount AssociateS3Resources DisassociateMemberAccount DisassociateS3Resources ListMemberAccounts ListS3Resources UpdateS3Resources / }
103  
104 1;
105  
106 ### main pod documentation begin ###
107  
108 =head1 NAME
109  
110 Paws::Macie - Perl Interface to AWS Amazon Macie
111  
112 =head1 SYNOPSIS
113  
114 use Paws;
115  
116 my $obj = Paws->service('Macie');
117 my $res = $obj->Method(
118 Arg1 => $val1,
119 Arg2 => [ 'V1', 'V2' ],
120 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
121 # of the arguments type
122 Arg3 => { Att1 => 'Val1' },
123 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
124 # the constructor of the arguments type
125 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
126 );
127  
128 =head1 DESCRIPTION
129  
130 Amazon Macie Classic
131  
132 Amazon Macie Classic is a security service that uses machine learning
133 to automatically discover, classify, and protect sensitive data in AWS.
134 Macie Classic recognizes sensitive data such as personally identifiable
135 information (PII) or intellectual property, and provides you with
136 dashboards and alerts that give visibility into how this data is being
137 accessed or moved. For more information, see the Amazon Macie Classic
138 User Guide
139 (https://docs.aws.amazon.com/macie/latest/userguide/what-is-macie.html).
140  
141 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19>
142  
143  
144 =head1 METHODS
145  
146 =head2 AssociateMemberAccount
147  
148 =over
149  
150 =item MemberAccountId => Str
151  
152  
153 =back
154  
155 Each argument is described in detail in: L<Paws::Macie::AssociateMemberAccount>
156  
157 Returns: nothing
158  
159 Associates a specified AWS account with Amazon Macie Classic as a
160 member account.
161  
162  
163 =head2 AssociateS3Resources
164  
165 =over
166  
167 =item S3Resources => ArrayRef[L<Paws::Macie::S3ResourceClassification>]
168  
169 =item [MemberAccountId => Str]
170  
171  
172 =back
173  
174 Each argument is described in detail in: L<Paws::Macie::AssociateS3Resources>
175  
176 Returns: a L<Paws::Macie::AssociateS3ResourcesResult> instance
177  
178 Associates specified S3 resources with Amazon Macie Classic for
179 monitoring and data classification. If memberAccountId isn't specified,
180 the action associates specified S3 resources with Macie Classic for the
181 current Macie Classic administrator account. If memberAccountId is
182 specified, the action associates specified S3 resources with Macie
183 Classic for the specified member account.
184  
185  
186 =head2 DisassociateMemberAccount
187  
188 =over
189  
190 =item MemberAccountId => Str
191  
192  
193 =back
194  
195 Each argument is described in detail in: L<Paws::Macie::DisassociateMemberAccount>
196  
197 Returns: nothing
198  
199 Removes the specified member account from Amazon Macie Classic.
200  
201  
202 =head2 DisassociateS3Resources
203  
204 =over
205  
206 =item AssociatedS3Resources => ArrayRef[L<Paws::Macie::S3Resource>]
207  
208 =item [MemberAccountId => Str]
209  
210  
211 =back
212  
213 Each argument is described in detail in: L<Paws::Macie::DisassociateS3Resources>
214  
215 Returns: a L<Paws::Macie::DisassociateS3ResourcesResult> instance
216  
217 Removes specified S3 resources from being monitored by Amazon Macie
218 Classic. If memberAccountId isn't specified, the action removes
219 specified S3 resources from Macie Classic for the current Macie Classic
220 administrator account. If memberAccountId is specified, the action
221 removes specified S3 resources from Macie Classic for the specified
222 member account.
223  
224  
225 =head2 ListMemberAccounts
226  
227 =over
228  
229 =item [MaxResults => Int]
230  
231 =item [NextToken => Str]
232  
233  
234 =back
235  
236 Each argument is described in detail in: L<Paws::Macie::ListMemberAccounts>
237  
238 Returns: a L<Paws::Macie::ListMemberAccountsResult> instance
239  
240 Lists all Amazon Macie Classic member accounts for the current Macie
241 Classic administrator account.
242  
243  
244 =head2 ListS3Resources
245  
246 =over
247  
248 =item [MaxResults => Int]
249  
250 =item [MemberAccountId => Str]
251  
252 =item [NextToken => Str]
253  
254  
255 =back
256  
257 Each argument is described in detail in: L<Paws::Macie::ListS3Resources>
258  
259 Returns: a L<Paws::Macie::ListS3ResourcesResult> instance
260  
261 Lists all the S3 resources associated with Amazon Macie Classic. If
262 memberAccountId isn't specified, the action lists the S3 resources
263 associated with Macie Classic for the current Macie Classic
264 administrator account. If memberAccountId is specified, the action
265 lists the S3 resources associated with Macie Classic for the specified
266 member account.
267  
268  
269 =head2 UpdateS3Resources
270  
271 =over
272  
273 =item S3ResourcesUpdate => ArrayRef[L<Paws::Macie::S3ResourceClassificationUpdate>]
274  
275 =item [MemberAccountId => Str]
276  
277  
278 =back
279  
280 Each argument is described in detail in: L<Paws::Macie::UpdateS3Resources>
281  
282 Returns: a L<Paws::Macie::UpdateS3ResourcesResult> instance
283  
284 Updates the classification types for the specified S3 resources. If
285 memberAccountId isn't specified, the action updates the classification
286 types of the S3 resources associated with Amazon Macie Classic for the
287 current Macie Classic administrator account. If memberAccountId is
288 specified, the action updates the classification types of the S3
289 resources associated with Macie Classic for the specified member
290 account.
291  
292  
293  
294  
295 =head1 PAGINATORS
296  
297 Paginator methods are helpers that repetively call methods that return partial results
298  
299 =head2 ListAllMemberAccounts(sub { },[MaxResults => Int, NextToken => Str])
300  
301 =head2 ListAllMemberAccounts([MaxResults => Int, NextToken => Str])
302  
303  
304 If passed a sub as first parameter, it will call the sub for each element found in :
305  
306 - memberAccounts, passing the object as the first parameter, and the string 'memberAccounts' as the second parameter
307  
308 If not, it will return a a L<Paws::Macie::ListMemberAccountsResult> 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.
309  
310  
311 =head2 ListAllS3Resources(sub { },[MaxResults => Int, MemberAccountId => Str, NextToken => Str])
312  
313 =head2 ListAllS3Resources([MaxResults => Int, MemberAccountId => Str, NextToken => Str])
314  
315  
316 If passed a sub as first parameter, it will call the sub for each element found in :
317  
318 - s3Resources, passing the object as the first parameter, and the string 's3Resources' as the second parameter
319  
320 If not, it will return a a L<Paws::Macie::ListS3ResourcesResult> 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.
321  
322  
323  
324  
325  
326 =head1 SEE ALSO
327  
328 This service class forms part of L<Paws>
329  
330 =head1 BUGS and CONTRIBUTIONS
331  
332 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
333  
334 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
335  
336 =cut
337