Detective class

Detective uses machine learning and purpose-built visualizations to help you analyze and investigate security issues across your Amazon Web Services (AWS) workloads. Detective automatically extracts time-based events such as login attempts, API calls, and network traffic from AWS CloudTrail and Amazon Virtual Private Cloud (Amazon VPC) flow logs. It also extracts findings detected by Amazon GuardDuty.

The Detective API primarily supports the creation and management of behavior graphs. A behavior graph contains the extracted data from a set of member accounts, and is created and managed by a master account.

Every behavior graph is specific to a Region. You can only use the API to manage graphs that belong to the Region that is associated with the currently selected endpoint.

A Detective master account can use the Detective API to do the following:

  • Enable and disable Detective. Enabling Detective creates a new behavior graph.
  • View the list of member accounts in a behavior graph.
  • Add member accounts to a behavior graph.
  • Remove member accounts from a behavior graph.
A member account can use the Detective API to do the following:
  • View the list of behavior graphs that they are invited to.
  • Accept an invitation to contribute to a behavior graph.
  • Decline an invitation to contribute to a behavior graph.
  • Remove their account from a behavior graph.
All API actions are logged as CloudTrail events. See Logging Detective API Calls with CloudTrail.

Constructors

Detective({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

acceptInvitation({required String graphArn}) Future<void>
Accepts an invitation for the member account to contribute data to a behavior graph. This operation can only be called by an invited member account.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
createGraph() Future<CreateGraphResponse>
Creates a new behavior graph for the calling account, and sets that account as the master account. This operation is called by the account that is enabling Detective.
createMembers({required List<Account> accounts, required String graphArn, String? message}) Future<CreateMembersResponse>
Sends a request to invite the specified AWS accounts to be member accounts in the behavior graph. This operation can only be called by the master account for a behavior graph.
deleteGraph({required String graphArn}) Future<void>
Disables the specified behavior graph and queues it to be deleted. This operation removes the graph from each member account's list of behavior graphs.
deleteMembers({required List<String> accountIds, required String graphArn}) Future<DeleteMembersResponse>
Deletes one or more member accounts from the master account behavior graph. This operation can only be called by a Detective master account. That account cannot use DeleteMembers to delete their own account from the behavior graph. To disable a behavior graph, the master account uses the DeleteGraph API method.
disassociateMembership({required String graphArn}) Future<void>
Removes the member account from the specified behavior graph. This operation can only be called by a member account that has the ENABLED status.
getMembers({required List<String> accountIds, required String graphArn}) Future<GetMembersResponse>
Returns the membership details for specified member accounts for a behavior graph.
listGraphs({int? maxResults, String? nextToken}) Future<ListGraphsResponse>
Returns the list of behavior graphs that the calling account is a master of. This operation can only be called by a master account.
listInvitations({int? maxResults, String? nextToken}) Future<ListInvitationsResponse>
Retrieves the list of open and accepted behavior graph invitations for the member account. This operation can only be called by a member account.
listMembers({required String graphArn, int? maxResults, String? nextToken}) Future<ListMembersResponse>
Retrieves the list of member accounts for a behavior graph. Does not return member accounts that were removed from the behavior graph.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rejectInvitation({required String graphArn}) Future<void>
Rejects an invitation to contribute the account data to a behavior graph. This operation must be called by a member account that has the INVITED status.
startMonitoringMember({required String accountId, required String graphArn}) Future<void>
Sends a request to enable data ingest for a member account that has a status of ACCEPTED_BUT_DISABLED.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited