blib/lib/Paws/Detective.pm untested

filter: Statementstmt 0.0% 0 / 58 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 21 Podpod 0.0% 0 / 20 totaltotal 0.0% 0 / 99 CC 1 SCAR 6.9
CC
1
Cov
0%
service
2.0
signing_name
2.0
version
2.0
CRAP 2.0
1 package Paws::Detective;
2 use Moose;
3 sub service { 'api.detective' }
4 sub signing_name { 'detective' }
5 sub version { '2018-10-26' }
6 sub flattened_arrays { 0 }
7 has max_attempts => (is => 'ro', isa => 'Int', default => 5);
8 has retry => (is => 'ro', isa => 'HashRef', default => sub {
9 { base => 'rand', type => 'exponential', growth_factor => 2 }
10 });
11 has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
12 ] });
13  
14 with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::RestJsonCaller';
15  
16
17 sub AcceptInvitation {
18 my $self = shift;
19 my $call_object = $self->new_with_coercions('Paws::Detective::AcceptInvitation', @_);
20 return $self->caller->do_call($self, $call_object);
21 }
22 sub CreateGraph {
23 my $self = shift;
24 my $call_object = $self->new_with_coercions('Paws::Detective::CreateGraph', @_);
25 return $self->caller->do_call($self, $call_object);
26 }
27 sub CreateMembers {
28 my $self = shift;
29 my $call_object = $self->new_with_coercions('Paws::Detective::CreateMembers', @_);
30 return $self->caller->do_call($self, $call_object);
31 }
32 sub DeleteGraph {
33 my $self = shift;
34 my $call_object = $self->new_with_coercions('Paws::Detective::DeleteGraph', @_);
35 return $self->caller->do_call($self, $call_object);
36 }
37 sub DeleteMembers {
38 my $self = shift;
39 my $call_object = $self->new_with_coercions('Paws::Detective::DeleteMembers', @_);
40 return $self->caller->do_call($self, $call_object);
41 }
42 sub DisassociateMembership {
43 my $self = shift;
44 my $call_object = $self->new_with_coercions('Paws::Detective::DisassociateMembership', @_);
45 return $self->caller->do_call($self, $call_object);
46 }
47 sub GetMembers {
48 my $self = shift;
49 my $call_object = $self->new_with_coercions('Paws::Detective::GetMembers', @_);
50 return $self->caller->do_call($self, $call_object);
51 }
52 sub ListGraphs {
53 my $self = shift;
54 my $call_object = $self->new_with_coercions('Paws::Detective::ListGraphs', @_);
55 return $self->caller->do_call($self, $call_object);
56 }
57 sub ListInvitations {
58 my $self = shift;
59 my $call_object = $self->new_with_coercions('Paws::Detective::ListInvitations', @_);
60 return $self->caller->do_call($self, $call_object);
61 }
62 sub ListMembers {
63 my $self = shift;
64 my $call_object = $self->new_with_coercions('Paws::Detective::ListMembers', @_);
65 return $self->caller->do_call($self, $call_object);
66 }
67 sub ListTagsForResource {
68 my $self = shift;
69 my $call_object = $self->new_with_coercions('Paws::Detective::ListTagsForResource', @_);
70 return $self->caller->do_call($self, $call_object);
71 }
72 sub RejectInvitation {
73 my $self = shift;
74 my $call_object = $self->new_with_coercions('Paws::Detective::RejectInvitation', @_);
75 return $self->caller->do_call($self, $call_object);
76 }
77 sub StartMonitoringMember {
78 my $self = shift;
79 my $call_object = $self->new_with_coercions('Paws::Detective::StartMonitoringMember', @_);
80 return $self->caller->do_call($self, $call_object);
81 }
82 sub TagResource {
83 my $self = shift;
84 my $call_object = $self->new_with_coercions('Paws::Detective::TagResource', @_);
85 return $self->caller->do_call($self, $call_object);
86 }
87 sub UntagResource {
88 my $self = shift;
89 my $call_object = $self->new_with_coercions('Paws::Detective::UntagResource', @_);
90 return $self->caller->do_call($self, $call_object);
91 }
92
93  
94  
95 sub operations { qw/AcceptInvitation CreateGraph CreateMembers DeleteGraph DeleteMembers DisassociateMembership GetMembers ListGraphs ListInvitations ListMembers ListTagsForResource RejectInvitation StartMonitoringMember TagResource UntagResource / }
96  
97 1;
98  
99 ### main pod documentation begin ###
100  
101 =head1 NAME
102  
103 Paws::Detective - Perl Interface to AWS Amazon Detective
104  
105 =head1 SYNOPSIS
106  
107 use Paws;
108  
109 my $obj = Paws->service('Detective');
110 my $res = $obj->Method(
111 Arg1 => $val1,
112 Arg2 => [ 'V1', 'V2' ],
113 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
114 # of the arguments type
115 Arg3 => { Att1 => 'Val1' },
116 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
117 # the constructor of the arguments type
118 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
119 );
120  
121 =head1 DESCRIPTION
122  
123 Detective uses machine learning and purpose-built visualizations to
124 help you analyze and investigate security issues across your Amazon Web
125 Services (AWS) workloads. Detective automatically extracts time-based
126 events such as login attempts, API calls, and network traffic from AWS
127 CloudTrail and Amazon Virtual Private Cloud (Amazon VPC) flow logs. It
128 also extracts findings detected by Amazon GuardDuty.
129  
130 The Detective API primarily supports the creation and management of
131 behavior graphs. A behavior graph contains the extracted data from a
132 set of member accounts, and is created and managed by an administrator
133 account.
134  
135 Every behavior graph is specific to a Region. You can only use the API
136 to manage graphs that belong to the Region that is associated with the
137 currently selected endpoint.
138  
139 A Detective administrator account can use the Detective API to do the
140 following:
141  
142 =over
143  
144 =item *
145  
146 Enable and disable Detective. Enabling Detective creates a new behavior
147 graph.
148  
149 =item *
150  
151 View the list of member accounts in a behavior graph.
152  
153 =item *
154  
155 Add member accounts to a behavior graph.
156  
157 =item *
158  
159 Remove member accounts from a behavior graph.
160  
161 =back
162  
163 A member account can use the Detective API to do the following:
164  
165 =over
166  
167 =item *
168  
169 View the list of behavior graphs that they are invited to.
170  
171 =item *
172  
173 Accept an invitation to contribute to a behavior graph.
174  
175 =item *
176  
177 Decline an invitation to contribute to a behavior graph.
178  
179 =item *
180  
181 Remove their account from a behavior graph.
182  
183 =back
184  
185 All API actions are logged as CloudTrail events. See Logging Detective
186 API Calls with CloudTrail
187 (https://docs.aws.amazon.com/detective/latest/adminguide/logging-using-cloudtrail.html).
188  
189 We replaced the term "master account" with the term "administrator
190 account." An administrator account is used to centrally manage multiple
191 accounts. In the case of Detective, the administrator account manages
192 the accounts in their behavior graph.
193  
194 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/api.detective-2018-10-26>
195  
196  
197 =head1 METHODS
198  
199 =head2 AcceptInvitation
200  
201 =over
202  
203 =item GraphArn => Str
204  
205  
206 =back
207  
208 Each argument is described in detail in: L<Paws::Detective::AcceptInvitation>
209  
210 Returns: nothing
211  
212 Accepts an invitation for the member account to contribute data to a
213 behavior graph. This operation can only be called by an invited member
214 account.
215  
216 The request provides the ARN of behavior graph.
217  
218 The member account status in the graph must be C<INVITED>.
219  
220  
221 =head2 CreateGraph
222  
223 =over
224  
225 =item [Tags => L<Paws::Detective::TagMap>]
226  
227  
228 =back
229  
230 Each argument is described in detail in: L<Paws::Detective::CreateGraph>
231  
232 Returns: a L<Paws::Detective::CreateGraphResponse> instance
233  
234 Creates a new behavior graph for the calling account, and sets that
235 account as the administrator account. This operation is called by the
236 account that is enabling Detective.
237  
238 Before you try to enable Detective, make sure that your account has
239 been enrolled in Amazon GuardDuty for at least 48 hours. If you do not
240 meet this requirement, you cannot enable Detective. If you do meet the
241 GuardDuty prerequisite, then when you make the request to enable
242 Detective, it checks whether your data volume is within the Detective
243 quota. If it exceeds the quota, then you cannot enable Detective.
244  
245 The operation also enables Detective for the calling account in the
246 currently selected Region. It returns the ARN of the new behavior
247 graph.
248  
249 C<CreateGraph> triggers a process to create the corresponding data
250 tables for the new behavior graph.
251  
252 An account can only be the administrator account for one behavior graph
253 within a Region. If the same account calls C<CreateGraph> with the same
254 administrator account, it always returns the same behavior graph ARN.
255 It does not create a new behavior graph.
256  
257  
258 =head2 CreateMembers
259  
260 =over
261  
262 =item Accounts => ArrayRef[L<Paws::Detective::Account>]
263  
264 =item GraphArn => Str
265  
266 =item [DisableEmailNotification => Bool]
267  
268 =item [Message => Str]
269  
270  
271 =back
272  
273 Each argument is described in detail in: L<Paws::Detective::CreateMembers>
274  
275 Returns: a L<Paws::Detective::CreateMembersResponse> instance
276  
277 Sends a request to invite the specified AWS accounts to be member
278 accounts in the behavior graph. This operation can only be called by
279 the administrator account for a behavior graph.
280  
281 C<CreateMembers> verifies the accounts and then invites the verified
282 accounts. The administrator can optionally specify to not send
283 invitation emails to the member accounts. This would be used when the
284 administrator manages their member accounts centrally.
285  
286 The request provides the behavior graph ARN and the list of accounts to
287 invite.
288  
289 The response separates the requested accounts into two lists:
290  
291 =over
292  
293 =item *
294  
295 The accounts that C<CreateMembers> was able to start the verification
296 for. This list includes member accounts that are being verified, that
297 have passed verification and are to be invited, and that have failed
298 verification.
299  
300 =item *
301  
302 The accounts that C<CreateMembers> was unable to process. This list
303 includes accounts that were already invited to be member accounts in
304 the behavior graph.
305  
306 =back
307  
308  
309  
310 =head2 DeleteGraph
311  
312 =over
313  
314 =item GraphArn => Str
315  
316  
317 =back
318  
319 Each argument is described in detail in: L<Paws::Detective::DeleteGraph>
320  
321 Returns: nothing
322  
323 Disables the specified behavior graph and queues it to be deleted. This
324 operation removes the graph from each member account's list of behavior
325 graphs.
326  
327 C<DeleteGraph> can only be called by the administrator account for a
328 behavior graph.
329  
330  
331 =head2 DeleteMembers
332  
333 =over
334  
335 =item AccountIds => ArrayRef[Str|Undef]
336  
337 =item GraphArn => Str
338  
339  
340 =back
341  
342 Each argument is described in detail in: L<Paws::Detective::DeleteMembers>
343  
344 Returns: a L<Paws::Detective::DeleteMembersResponse> instance
345  
346 Deletes one or more member accounts from the administrator account's
347 behavior graph. This operation can only be called by a Detective
348 administrator account. That account cannot use C<DeleteMembers> to
349 delete their own account from the behavior graph. To disable a behavior
350 graph, the administrator account uses the C<DeleteGraph> API method.
351  
352  
353 =head2 DisassociateMembership
354  
355 =over
356  
357 =item GraphArn => Str
358  
359  
360 =back
361  
362 Each argument is described in detail in: L<Paws::Detective::DisassociateMembership>
363  
364 Returns: nothing
365  
366 Removes the member account from the specified behavior graph. This
367 operation can only be called by a member account that has the
368 C<ENABLED> status.
369  
370  
371 =head2 GetMembers
372  
373 =over
374  
375 =item AccountIds => ArrayRef[Str|Undef]
376  
377 =item GraphArn => Str
378  
379  
380 =back
381  
382 Each argument is described in detail in: L<Paws::Detective::GetMembers>
383  
384 Returns: a L<Paws::Detective::GetMembersResponse> instance
385  
386 Returns the membership details for specified member accounts for a
387 behavior graph.
388  
389  
390 =head2 ListGraphs
391  
392 =over
393  
394 =item [MaxResults => Int]
395  
396 =item [NextToken => Str]
397  
398  
399 =back
400  
401 Each argument is described in detail in: L<Paws::Detective::ListGraphs>
402  
403 Returns: a L<Paws::Detective::ListGraphsResponse> instance
404  
405 Returns the list of behavior graphs that the calling account is an
406 administrator account of. This operation can only be called by an
407 administrator account.
408  
409 Because an account can currently only be the administrator of one
410 behavior graph within a Region, the results always contain a single
411 behavior graph.
412  
413  
414 =head2 ListInvitations
415  
416 =over
417  
418 =item [MaxResults => Int]
419  
420 =item [NextToken => Str]
421  
422  
423 =back
424  
425 Each argument is described in detail in: L<Paws::Detective::ListInvitations>
426  
427 Returns: a L<Paws::Detective::ListInvitationsResponse> instance
428  
429 Retrieves the list of open and accepted behavior graph invitations for
430 the member account. This operation can only be called by a member
431 account.
432  
433 Open invitations are invitations that the member account has not
434 responded to.
435  
436 The results do not include behavior graphs for which the member account
437 declined the invitation. The results also do not include behavior
438 graphs that the member account resigned from or was removed from.
439  
440  
441 =head2 ListMembers
442  
443 =over
444  
445 =item GraphArn => Str
446  
447 =item [MaxResults => Int]
448  
449 =item [NextToken => Str]
450  
451  
452 =back
453  
454 Each argument is described in detail in: L<Paws::Detective::ListMembers>
455  
456 Returns: a L<Paws::Detective::ListMembersResponse> instance
457  
458 Retrieves the list of member accounts for a behavior graph. Does not
459 return member accounts that were removed from the behavior graph.
460  
461  
462 =head2 ListTagsForResource
463  
464 =over
465  
466 =item ResourceArn => Str
467  
468  
469 =back
470  
471 Each argument is described in detail in: L<Paws::Detective::ListTagsForResource>
472  
473 Returns: a L<Paws::Detective::ListTagsForResourceResponse> instance
474  
475 Returns the tag values that are assigned to a behavior graph.
476  
477  
478 =head2 RejectInvitation
479  
480 =over
481  
482 =item GraphArn => Str
483  
484  
485 =back
486  
487 Each argument is described in detail in: L<Paws::Detective::RejectInvitation>
488  
489 Returns: nothing
490  
491 Rejects an invitation to contribute the account data to a behavior
492 graph. This operation must be called by a member account that has the
493 C<INVITED> status.
494  
495  
496 =head2 StartMonitoringMember
497  
498 =over
499  
500 =item AccountId => Str
501  
502 =item GraphArn => Str
503  
504  
505 =back
506  
507 Each argument is described in detail in: L<Paws::Detective::StartMonitoringMember>
508  
509 Returns: nothing
510  
511 Sends a request to enable data ingest for a member account that has a
512 status of C<ACCEPTED_BUT_DISABLED>.
513  
514 For valid member accounts, the status is updated as follows.
515  
516 =over
517  
518 =item *
519  
520 If Detective enabled the member account, then the new status is
521 C<ENABLED>.
522  
523 =item *
524  
525 If Detective cannot enable the member account, the status remains
526 C<ACCEPTED_BUT_DISABLED>.
527  
528 =back
529  
530  
531  
532 =head2 TagResource
533  
534 =over
535  
536 =item ResourceArn => Str
537  
538 =item Tags => L<Paws::Detective::TagMap>
539  
540  
541 =back
542  
543 Each argument is described in detail in: L<Paws::Detective::TagResource>
544  
545 Returns: a L<Paws::Detective::TagResourceResponse> instance
546  
547 Applies tag values to a behavior graph.
548  
549  
550 =head2 UntagResource
551  
552 =over
553  
554 =item ResourceArn => Str
555  
556 =item TagKeys => ArrayRef[Str|Undef]
557  
558  
559 =back
560  
561 Each argument is described in detail in: L<Paws::Detective::UntagResource>
562  
563 Returns: a L<Paws::Detective::UntagResourceResponse> instance
564  
565 Removes tags from a behavior graph.
566  
567  
568  
569  
570 =head1 PAGINATORS
571  
572 Paginator methods are helpers that repetively call methods that return partial results
573  
574  
575  
576  
577 =head1 SEE ALSO
578  
579 This service class forms part of L<Paws>
580  
581 =head1 BUGS and CONTRIBUTIONS
582  
583 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
584  
585 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
586  
587 =cut
588