We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.Detective

Inherits:
AWS.Service show all
Identifier:
detective
API Version:
2018-10-26
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Detective uses machine learning and purpose-built visualizations to help you to analyze and investigate security issues across your Amazon Web Services (Amazon Web Services) workloads. Detective automatically extracts time-based events such as login attempts, API calls, and network traffic from 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 an administrator account.

To add a member account to the behavior graph, the administrator account sends an invitation to the account. When the account accepts the invitation, it becomes a member account in the behavior graph.

Detective is also integrated with Organizations. The organization management account designates the Detective administrator account for the organization. That account becomes the administrator account for the organization behavior graph. The Detective administrator account is also the delegated administrator account for Detective in Organizations.

The Detective administrator account can enable any organization account as a member account in the organization behavior graph. The organization accounts do not receive invitations. The Detective administrator account can also invite other accounts to the organization behavior graph.

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

The administrator account for a behavior graph 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.

  • Apply tags to a behavior graph.

The organization management account can use the Detective API to select the delegated administrator for Detective.

The Detective administrator account for an organization can use the Detective API to do the following:

  • Perform all of the functions of an administrator account.

  • Determine whether to automatically enable new organization accounts as member accounts in the organization behavior graph.

An invited 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.

Note: We replaced the term "master account" with the term "administrator account". An administrator account is used to centrally manage multiple accounts. In the case of Detective, the administrator account manages the accounts in their behavior graph.

Sending a Request Using Detective

var detective = new AWS.Detective();
detective.acceptInvitation(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Detective object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var detective = new AWS.Detective({apiVersion: '2018-10-26'});

You can also set the API version globally in AWS.config.apiVersions using the detective service identifier:

AWS.config.apiVersions = {
  detective: '2018-10-26',
  // other service API versions
};

var detective = new AWS.Detective();

Version:

  • 2018-10-26

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Detective(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Detective object

var detective = new AWS.Detective({apiVersion: '2018-10-26'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Detective.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Detective.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Detective.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

acceptInvitation(params = {}, callback) ⇒ AWS.Request

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.

The request provides the ARN of behavior graph.

The member account status in the graph must be INVITED.

Service Reference:

Examples:

Calling the acceptInvitation operation

var params = {
  GraphArn: 'STRING_VALUE' /* required */
};
detective.acceptInvitation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the behavior graph that the member account is accepting the invitation for.

      The member account status in the behavior graph must be INVITED.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchGetGraphMemberDatasources(params = {}, callback) ⇒ AWS.Request

Gets data source package information for the behavior graph.

Service Reference:

Examples:

Calling the batchGetGraphMemberDatasources operation

var params = {
  AccountIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  GraphArn: 'STRING_VALUE' /* required */
};
detective.batchGetGraphMemberDatasources(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the behavior graph.

    • AccountIds — (Array<String>)

      The list of Amazon Web Services accounts to get data source package information on.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MemberDatasources — (Array<map>)

        Details on the status of data source packages for members of the behavior graph.

        • AccountId — (String)

          The account identifier of the Amazon Web Services account.

        • GraphArn — (String)

          The ARN of the organization behavior graph.

        • DatasourcePackageIngestHistory — (map<map<map>>)

          Details on when a data source package was added to a behavior graph.

          • Timestamp — (Date)

            The data and time when data collection began for a source package. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

      • UnprocessedAccounts — (Array<map>)

        Accounts that data source package information could not be retrieved for.

        • AccountId — (String)

          The Amazon Web Services account identifier of the member account that was not processed.

        • Reason — (String)

          The reason that the member account request could not be processed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchGetMembershipDatasources(params = {}, callback) ⇒ AWS.Request

Gets information on the data source package history for an account.

Service Reference:

Examples:

Calling the batchGetMembershipDatasources operation

var params = {
  GraphArns: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
detective.batchGetMembershipDatasources(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArns — (Array<String>)

      The ARN of the behavior graph.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MembershipDatasources — (Array<map>)

        Details on the data source package history for an member of the behavior graph.

        • AccountId — (String)

          The account identifier of the Amazon Web Services account.

        • GraphArn — (String)

          The ARN of the organization behavior graph.

        • DatasourcePackageIngestHistory — (map<map<map>>)

          Details on when a data source package was added to a behavior graph.

          • Timestamp — (Date)

            The data and time when data collection began for a source package. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

      • UnprocessedGraphs — (Array<map>)

        Graphs that data source package information could not be retrieved for.

        • GraphArn — (String)

          The ARN of the organization behavior graph.

        • Reason — (String)

          The reason data source package information could not be processed for a behavior graph.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createGraph(params = {}, callback) ⇒ AWS.Request

Creates a new behavior graph for the calling account, and sets that account as the administrator account. This operation is called by the account that is enabling Detective.

The operation also enables Detective for the calling account in the currently selected Region. It returns the ARN of the new behavior graph.

CreateGraph triggers a process to create the corresponding data tables for the new behavior graph.

An account can only be the administrator account for one behavior graph within a Region. If the same account calls CreateGraph with the same administrator account, it always returns the same behavior graph ARN. It does not create a new behavior graph.

Service Reference:

Examples:

Calling the createGraph operation

var params = {
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
detective.createGraph(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Tags — (map<String>)

      The tags to assign to the new behavior graph. You can add up to 50 tags. For each tag, you provide the tag key and the tag value. Each tag key can contain up to 128 characters. Each tag value can contain up to 256 characters.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GraphArn — (String)

        The ARN of the new behavior graph.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createMembers(params = {}, callback) ⇒ AWS.Request

CreateMembers is used to send invitations to accounts. For the organization behavior graph, the Detective administrator account uses CreateMembers to enable organization accounts as member accounts.

For invited accounts, CreateMembers sends a request to invite the specified Amazon Web Services accounts to be member accounts in the behavior graph. This operation can only be called by the administrator account for a behavior graph.

CreateMembers verifies the accounts and then invites the verified accounts. The administrator can optionally specify to not send invitation emails to the member accounts. This would be used when the administrator manages their member accounts centrally.

For organization accounts in the organization behavior graph, CreateMembers attempts to enable the accounts. The organization accounts do not receive invitations.

The request provides the behavior graph ARN and the list of accounts to invite or to enable.

The response separates the requested accounts into two lists:

  • The accounts that CreateMembers was able to process. For invited accounts, includes member accounts that are being verified, that have passed verification and are to be invited, and that have failed verification. For organization accounts in the organization behavior graph, includes accounts that can be enabled and that cannot be enabled.

  • The accounts that CreateMembers was unable to process. This list includes accounts that were already invited to be member accounts in the behavior graph.

Service Reference:

Examples:

Calling the createMembers operation

var params = {
  Accounts: [ /* required */
    {
      AccountId: 'STRING_VALUE', /* required */
      EmailAddress: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  GraphArn: 'STRING_VALUE', /* required */
  DisableEmailNotification: true || false,
  Message: 'STRING_VALUE'
};
detective.createMembers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the behavior graph.

    • Message — (String)

      Customized message text to include in the invitation email message to the invited member accounts.

    • DisableEmailNotification — (Boolean)

      if set to true, then the invited accounts do not receive email notifications. By default, this is set to false, and the invited accounts receive email notifications.

      Organization accounts in the organization behavior graph do not receive email notifications.

    • Accounts — (Array<map>)

      The list of Amazon Web Services accounts to invite or to enable. You can invite or enable up to 50 accounts at a time. For each invited account, the account list contains the account identifier and the Amazon Web Services account root user email address. For organization accounts in the organization behavior graph, the email address is not required.

      • AccountIdrequired — (String)

        The account identifier of the Amazon Web Services account.

      • EmailAddressrequired — (String)

        The Amazon Web Services account root user email address for the Amazon Web Services account.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Members — (Array<map>)

        The set of member account invitation or enablement requests that Detective was able to process. This includes accounts that are being verified, that failed verification, and that passed verification and are being sent an invitation or are being enabled.

        • AccountId — (String)

          The Amazon Web Services account identifier for the member account.

        • EmailAddress — (String)

          The Amazon Web Services account root user email address for the member account.

        • GraphArn — (String)

          The ARN of the behavior graph.

        • MasterId — (String)

          The Amazon Web Services account identifier of the administrator account for the behavior graph.

        • AdministratorId — (String)

          The Amazon Web Services account identifier of the administrator account for the behavior graph.

        • Status — (String)

          The current membership status of the member account. The status can have one of the following values:

          • INVITED - For invited accounts only. Indicates that the member was sent an invitation but has not yet responded.

          • VERIFICATION_IN_PROGRESS - For invited accounts only, indicates that Detective is verifying that the account identifier and email address provided for the member account match. If they do match, then Detective sends the invitation. If the email address and account identifier don't match, then the member cannot be added to the behavior graph.

            For organization accounts in the organization behavior graph, indicates that Detective is verifying that the account belongs to the organization.

          • VERIFICATION_FAILED - For invited accounts only. Indicates that the account and email address provided for the member account do not match, and Detective did not send an invitation to the account.

          • ENABLED - Indicates that the member account currently contributes data to the behavior graph. For invited accounts, the member account accepted the invitation. For organization accounts in the organization behavior graph, the Detective administrator account enabled the organization account as a member account.

          • ACCEPTED_BUT_DISABLED - The account accepted the invitation, or was enabled by the Detective administrator account, but is prevented from contributing data to the behavior graph. DisabledReason provides the reason why the member account is not enabled.

          Invited accounts that declined an invitation or that were removed from the behavior graph are not included. In the organization behavior graph, organization accounts that the Detective administrator account did not enable are not included.

          Possible values include:
          • "INVITED"
          • "VERIFICATION_IN_PROGRESS"
          • "VERIFICATION_FAILED"
          • "ENABLED"
          • "ACCEPTED_BUT_DISABLED"
        • DisabledReason — (String)

          For member accounts with a status of ACCEPTED_BUT_DISABLED, the reason that the member account is not enabled.

          The reason can have one of the following values:

          • VOLUME_TOO_HIGH - Indicates that adding the member account would cause the data volume for the behavior graph to be too high.

          • VOLUME_UNKNOWN - Indicates that Detective is unable to verify the data volume for the member account. This is usually because the member account is not enrolled in Amazon GuardDuty.

          Possible values include:
          • "VOLUME_TOO_HIGH"
          • "VOLUME_UNKNOWN"
        • InvitedTime — (Date)

          For invited accounts, the date and time that Detective sent the invitation to the account. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • UpdatedTime — (Date)

          The date and time that the member account was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • VolumeUsageInBytes — (Integer)

          The data volume in bytes per day for the member account.

        • VolumeUsageUpdatedTime — (Date)

          The data and time when the member account data volume was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • PercentOfGraphUtilization — (Float)

          The member account data volume as a percentage of the maximum allowed data volume. 0 indicates 0 percent, and 100 indicates 100 percent.

          Note that this is not the percentage of the behavior graph data volume.

          For example, the data volume for the behavior graph is 80 GB per day. The maximum data volume is 160 GB per day. If the data volume for the member account is 40 GB per day, then PercentOfGraphUtilization is 25. It represents 25% of the maximum allowed data volume.

        • PercentOfGraphUtilizationUpdatedTime — (Date)

          The date and time when the graph utilization percentage was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • InvitationType — (String)

          The type of behavior graph membership.

          For an organization account in the organization behavior graph, the type is ORGANIZATION.

          For an account that was invited to a behavior graph, the type is INVITATION.

          Possible values include:
          • "INVITATION"
          • "ORGANIZATION"
        • VolumeUsageByDatasourcePackage — (map<map>)

          Details on the volume of usage for each data source package in a behavior graph.

          • VolumeUsageInBytes — (Integer)

            Total volume of data in bytes per day ingested for a given data source package.

          • VolumeUsageUpdateTime — (Date)

            The data and time when the member account data volume was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • DatasourcePackageIngestStates — (map<String>)

          The state of a data source package for the behavior graph.

      • UnprocessedAccounts — (Array<map>)

        The list of accounts for which Detective was unable to process the invitation or enablement request. For each account, the list provides the reason why the request could not be processed. The list includes accounts that are already member accounts in the behavior graph.

        • AccountId — (String)

          The Amazon Web Services account identifier of the member account that was not processed.

        • Reason — (String)

          The reason that the member account request could not be processed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteGraph(params = {}, callback) ⇒ AWS.Request

Disables the specified behavior graph and queues it to be deleted. This operation removes the behavior graph from each member account's list of behavior graphs.

DeleteGraph can only be called by the administrator account for a behavior graph.

Service Reference:

Examples:

Calling the deleteGraph operation

var params = {
  GraphArn: 'STRING_VALUE' /* required */
};
detective.deleteGraph(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the behavior graph to disable.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteMembers(params = {}, callback) ⇒ AWS.Request

Removes the specified member accounts from the behavior graph. The removed accounts no longer contribute data to the behavior graph. This operation can only be called by the administrator account for the behavior graph.

For invited accounts, the removed accounts are deleted from the list of accounts in the behavior graph. To restore the account, the administrator account must send another invitation.

For organization accounts in the organization behavior graph, the Detective administrator account can always enable the organization account again. Organization accounts that are not enabled as member accounts are not included in the ListMembers results for the organization behavior graph.

An administrator account cannot use DeleteMembers to remove their own account from the behavior graph. To disable a behavior graph, the administrator account uses the DeleteGraph API method.

Service Reference:

Examples:

Calling the deleteMembers operation

var params = {
  AccountIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  GraphArn: 'STRING_VALUE' /* required */
};
detective.deleteMembers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the behavior graph to remove members from.

    • AccountIds — (Array<String>)

      The list of Amazon Web Services account identifiers for the member accounts to remove from the behavior graph. You can remove up to 50 member accounts at a time.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AccountIds — (Array<String>)

        The list of Amazon Web Services account identifiers for the member accounts that Detective successfully removed from the behavior graph.

      • UnprocessedAccounts — (Array<map>)

        The list of member accounts that Detective was not able to remove from the behavior graph. For each member account, provides the reason that the deletion could not be processed.

        • AccountId — (String)

          The Amazon Web Services account identifier of the member account that was not processed.

        • Reason — (String)

          The reason that the member account request could not be processed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeOrganizationConfiguration(params = {}, callback) ⇒ AWS.Request

Returns information about the configuration for the organization behavior graph. Currently indicates whether to automatically enable new organization accounts as member accounts.

Can only be called by the Detective administrator account for the organization.

Examples:

Calling the describeOrganizationConfiguration operation

var params = {
  GraphArn: 'STRING_VALUE' /* required */
};
detective.describeOrganizationConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the organization behavior graph.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AutoEnable — (Boolean)

        Indicates whether to automatically enable new organization accounts as member accounts in the organization behavior graph.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disableOrganizationAdminAccount(params = {}, callback) ⇒ AWS.Request

Removes the Detective administrator account in the current Region. Deletes the organization behavior graph.

Can only be called by the organization management account.

Removing the Detective administrator account does not affect the delegated administrator account for Detective in Organizations.

To remove the delegated administrator account in Organizations, use the Organizations API. Removing the delegated administrator account also removes the Detective administrator account in all Regions, except for Regions where the Detective administrator account is the organization management account.

Service Reference:

Examples:

Calling the disableOrganizationAdminAccount operation

detective.disableOrganizationAdminAccount(function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateMembership(params = {}, callback) ⇒ AWS.Request

Removes the member account from the specified behavior graph. This operation can only be called by an invited member account that has the ENABLED status.

DisassociateMembership cannot be called by an organization account in the organization behavior graph. For the organization behavior graph, the Detective administrator account determines which organization accounts to enable or disable as member accounts.

Service Reference:

Examples:

Calling the disassociateMembership operation

var params = {
  GraphArn: 'STRING_VALUE' /* required */
};
detective.disassociateMembership(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the behavior graph to remove the member account from.

      The member account's member status in the behavior graph must be ENABLED.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

enableOrganizationAdminAccount(params = {}, callback) ⇒ AWS.Request

Designates the Detective administrator account for the organization in the current Region.

If the account does not have Detective enabled, then enables Detective for that account and creates a new behavior graph.

Can only be called by the organization management account.

If the organization has a delegated administrator account in Organizations, then the Detective administrator account must be either the delegated administrator account or the organization management account.

If the organization does not have a delegated administrator account in Organizations, then you can choose any account in the organization. If you choose an account other than the organization management account, Detective calls Organizations to make that account the delegated administrator account for Detective. The organization management account cannot be the delegated administrator account.

Service Reference:

Examples:

Calling the enableOrganizationAdminAccount operation

var params = {
  AccountId: 'STRING_VALUE' /* required */
};
detective.enableOrganizationAdminAccount(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccountId — (String)

      The Amazon Web Services account identifier of the account to designate as the Detective administrator account for the organization.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getInvestigation(params = {}, callback) ⇒ AWS.Request

Detective investigations lets you investigate IAM users and IAM roles using indicators of compromise. An indicator of compromise (IOC) is an artifact observed in or on a network, system, or environment that can (with a high level of confidence) identify malicious activity or a security incident. GetInvestigation returns the investigation results of an investigation for a behavior graph.

Service Reference:

Examples:

Calling the getInvestigation operation

var params = {
  GraphArn: 'STRING_VALUE', /* required */
  InvestigationId: 'STRING_VALUE' /* required */
};
detective.getInvestigation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The Amazon Resource Name (ARN) of the behavior graph.

    • InvestigationId — (String)

      The investigation ID of the investigation report.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GraphArn — (String)

        The Amazon Resource Name (ARN) of the behavior graph.

      • InvestigationId — (String)

        The investigation ID of the investigation report.

      • EntityArn — (String)

        The unique Amazon Resource Name (ARN). Detective supports IAM user ARNs and IAM role ARNs.

      • EntityType — (String)

        Type of entity. For example, Amazon Web Services accounts, such as an IAM user and/or IAM role.

        Possible values include:
        • "IAM_ROLE"
        • "IAM_USER"
      • CreatedTime — (Date)

        The creation time of the investigation report in UTC time stamp format.

      • ScopeStartTime — (Date)

        The start date and time used to set the scope time within which you want to generate the investigation report. The value is an UTC ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

      • ScopeEndTime — (Date)

        The data and time when the investigation began. The value is an UTC ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

      • Status — (String)

        The status based on the completion status of the investigation.

        Possible values include:
        • "RUNNING"
        • "FAILED"
        • "SUCCESSFUL"
      • Severity — (String)

        The severity assigned is based on the likelihood and impact of the indicators of compromise discovered in the investigation.

        Possible values include:
        • "INFORMATIONAL"
        • "LOW"
        • "MEDIUM"
        • "HIGH"
        • "CRITICAL"
      • State — (String)

        The current state of the investigation. An archived investigation indicates that you have completed reviewing the investigation.

        Possible values include:
        • "ACTIVE"
        • "ARCHIVED"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getMembers(params = {}, callback) ⇒ AWS.Request

Returns the membership details for specified member accounts for a behavior graph.

Service Reference:

Examples:

Calling the getMembers operation

var params = {
  AccountIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  GraphArn: 'STRING_VALUE' /* required */
};
detective.getMembers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the behavior graph for which to request the member details.

    • AccountIds — (Array<String>)

      The list of Amazon Web Services account identifiers for the member account for which to return member details. You can request details for up to 50 member accounts at a time.

      You cannot use GetMembers to retrieve information about member accounts that were removed from the behavior graph.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MemberDetails — (Array<map>)

        The member account details that Detective is returning in response to the request.

        • AccountId — (String)

          The Amazon Web Services account identifier for the member account.

        • EmailAddress — (String)

          The Amazon Web Services account root user email address for the member account.

        • GraphArn — (String)

          The ARN of the behavior graph.

        • MasterId — (String)

          The Amazon Web Services account identifier of the administrator account for the behavior graph.

        • AdministratorId — (String)

          The Amazon Web Services account identifier of the administrator account for the behavior graph.

        • Status — (String)

          The current membership status of the member account. The status can have one of the following values:

          • INVITED - For invited accounts only. Indicates that the member was sent an invitation but has not yet responded.

          • VERIFICATION_IN_PROGRESS - For invited accounts only, indicates that Detective is verifying that the account identifier and email address provided for the member account match. If they do match, then Detective sends the invitation. If the email address and account identifier don't match, then the member cannot be added to the behavior graph.

            For organization accounts in the organization behavior graph, indicates that Detective is verifying that the account belongs to the organization.

          • VERIFICATION_FAILED - For invited accounts only. Indicates that the account and email address provided for the member account do not match, and Detective did not send an invitation to the account.

          • ENABLED - Indicates that the member account currently contributes data to the behavior graph. For invited accounts, the member account accepted the invitation. For organization accounts in the organization behavior graph, the Detective administrator account enabled the organization account as a member account.

          • ACCEPTED_BUT_DISABLED - The account accepted the invitation, or was enabled by the Detective administrator account, but is prevented from contributing data to the behavior graph. DisabledReason provides the reason why the member account is not enabled.

          Invited accounts that declined an invitation or that were removed from the behavior graph are not included. In the organization behavior graph, organization accounts that the Detective administrator account did not enable are not included.

          Possible values include:
          • "INVITED"
          • "VERIFICATION_IN_PROGRESS"
          • "VERIFICATION_FAILED"
          • "ENABLED"
          • "ACCEPTED_BUT_DISABLED"
        • DisabledReason — (String)

          For member accounts with a status of ACCEPTED_BUT_DISABLED, the reason that the member account is not enabled.

          The reason can have one of the following values:

          • VOLUME_TOO_HIGH - Indicates that adding the member account would cause the data volume for the behavior graph to be too high.

          • VOLUME_UNKNOWN - Indicates that Detective is unable to verify the data volume for the member account. This is usually because the member account is not enrolled in Amazon GuardDuty.

          Possible values include:
          • "VOLUME_TOO_HIGH"
          • "VOLUME_UNKNOWN"
        • InvitedTime — (Date)

          For invited accounts, the date and time that Detective sent the invitation to the account. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • UpdatedTime — (Date)

          The date and time that the member account was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • VolumeUsageInBytes — (Integer)

          The data volume in bytes per day for the member account.

        • VolumeUsageUpdatedTime — (Date)

          The data and time when the member account data volume was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • PercentOfGraphUtilization — (Float)

          The member account data volume as a percentage of the maximum allowed data volume. 0 indicates 0 percent, and 100 indicates 100 percent.

          Note that this is not the percentage of the behavior graph data volume.

          For example, the data volume for the behavior graph is 80 GB per day. The maximum data volume is 160 GB per day. If the data volume for the member account is 40 GB per day, then PercentOfGraphUtilization is 25. It represents 25% of the maximum allowed data volume.

        • PercentOfGraphUtilizationUpdatedTime — (Date)

          The date and time when the graph utilization percentage was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • InvitationType — (String)

          The type of behavior graph membership.

          For an organization account in the organization behavior graph, the type is ORGANIZATION.

          For an account that was invited to a behavior graph, the type is INVITATION.

          Possible values include:
          • "INVITATION"
          • "ORGANIZATION"
        • VolumeUsageByDatasourcePackage — (map<map>)

          Details on the volume of usage for each data source package in a behavior graph.

          • VolumeUsageInBytes — (Integer)

            Total volume of data in bytes per day ingested for a given data source package.

          • VolumeUsageUpdateTime — (Date)

            The data and time when the member account data volume was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • DatasourcePackageIngestStates — (map<String>)

          The state of a data source package for the behavior graph.

      • UnprocessedAccounts — (Array<map>)

        The requested member accounts for which Detective was unable to return member details.

        For each account, provides the reason why the request could not be processed.

        • AccountId — (String)

          The Amazon Web Services account identifier of the member account that was not processed.

        • Reason — (String)

          The reason that the member account request could not be processed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDatasourcePackages(params = {}, callback) ⇒ AWS.Request

Lists data source packages in the behavior graph.

Service Reference:

Examples:

Calling the listDatasourcePackages operation

var params = {
  GraphArn: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
detective.listDatasourcePackages(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the behavior graph.

    • NextToken — (String)

      For requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.

    • MaxResults — (Integer)

      The maximum number of results to return.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DatasourcePackages — (map<map>)

        Details on the data source packages active in the behavior graph.

        • DatasourcePackageIngestState — (String)

          Details on which data source packages are ingested for a member account.

          Possible values include:
          • "STARTED"
          • "STOPPED"
          • "DISABLED"
        • LastIngestStateChange — (map<map>)

          The date a data source package was enabled for this account

          • Timestamp — (Date)

            The data and time when data collection began for a source package. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

      • NextToken — (String)

        For requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listGraphs(params = {}, callback) ⇒ AWS.Request

Returns the list of behavior graphs that the calling account is an administrator account of. This operation can only be called by an administrator account.

Because an account can currently only be the administrator of one behavior graph within a Region, the results always contain a single behavior graph.

Service Reference:

Examples:

Calling the listGraphs operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
detective.listGraphs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      For requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.

    • MaxResults — (Integer)

      The maximum number of graphs to return at a time. The total must be less than the overall limit on the number of results to return, which is currently 200.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GraphList — (Array<map>)

        A list of behavior graphs that the account is an administrator account for.

        • Arn — (String)

          The ARN of the behavior graph.

        • CreatedTime — (Date)

          The date and time that the behavior graph was created. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

      • NextToken — (String)

        If there are more behavior graphs remaining in the results, then this is the pagination token to use to request the next page of behavior graphs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listIndicators(params = {}, callback) ⇒ AWS.Request

Gets the indicators from an investigation. You can use the information from the indicators to determine if an IAM user and/or IAM role is involved in an unusual activity that could indicate malicious behavior and its impact.

Service Reference:

Examples:

Calling the listIndicators operation

var params = {
  GraphArn: 'STRING_VALUE', /* required */
  InvestigationId: 'STRING_VALUE', /* required */
  IndicatorType: TTP_OBSERVED | IMPOSSIBLE_TRAVEL | FLAGGED_IP_ADDRESS | NEW_GEOLOCATION | NEW_ASO | NEW_USER_AGENT | RELATED_FINDING | RELATED_FINDING_GROUP,
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
detective.listIndicators(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The Amazon Resource Name (ARN) of the behavior graph.

    • InvestigationId — (String)

      The investigation ID of the investigation report.

    • IndicatorType — (String)

      For the list of indicators of compromise that are generated by Detective investigations, see Detective investigations.

      Possible values include:
      • "TTP_OBSERVED"
      • "IMPOSSIBLE_TRAVEL"
      • "FLAGGED_IP_ADDRESS"
      • "NEW_GEOLOCATION"
      • "NEW_ASO"
      • "NEW_USER_AGENT"
      • "RELATED_FINDING"
      • "RELATED_FINDING_GROUP"
    • NextToken — (String)

      Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged.

      Each pagination token expires after 24 hours. Using an expired pagination token will return a Validation Exception error.

    • MaxResults — (Integer)

      Lists the maximum number of indicators in a page.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GraphArn — (String)

        The Amazon Resource Name (ARN) of the behavior graph.

      • InvestigationId — (String)

        The investigation ID of the investigation report.

      • NextToken — (String)

        Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged.

        Each pagination token expires after 24 hours. Using an expired pagination token will return a Validation Exception error.

      • Indicators — (Array<map>)

        Lists the indicators of compromise.

        • IndicatorType — (String)

          The type of indicator.

          Possible values include:
          • "TTP_OBSERVED"
          • "IMPOSSIBLE_TRAVEL"
          • "FLAGGED_IP_ADDRESS"
          • "NEW_GEOLOCATION"
          • "NEW_ASO"
          • "NEW_USER_AGENT"
          • "RELATED_FINDING"
          • "RELATED_FINDING_GROUP"
        • IndicatorDetail — (map)

          Details about the indicators of compromise that are used to determine if a resource is involved in a security incident. An indicator of compromise (IOC) is an artifact observed in or on a network, system, or environment that can (with a high level of confidence) identify malicious activity or a security incident.

          • TTPsObservedDetail — (map)

            Details about the indicator of compromise.

            • Tactic — (String)

              The tactic used, identified by the investigation.

            • Technique — (String)

              The technique used, identified by the investigation.

            • Procedure — (String)

              The procedure used, identified by the investigation.

            • IpAddress — (String)

              The IP address where the tactics, techniques, and procedure (TTP) was observed.

            • APIName — (String)

              The name of the API where the tactics, techniques, and procedure (TTP) was observed.

            • APISuccessCount — (Integer)

              The total number of successful API requests.

            • APIFailureCount — (Integer)

              The total number of failed API requests.

          • ImpossibleTravelDetail — (map)

            Identifies unusual and impossible user activity for an account.

            • StartingIpAddress — (String)

              IP address where the resource was first used in the impossible travel.

            • EndingIpAddress — (String)

              IP address where the resource was last used in the impossible travel.

            • StartingLocation — (String)

              Location where the resource was first used in the impossible travel.

            • EndingLocation — (String)

              Location where the resource was last used in the impossible travel.

            • HourlyTimeDelta — (Integer)

              Returns the time difference between the first and last timestamp the resource was used.

          • FlaggedIpAddressDetail — (map)

            Suspicious IP addresses that are flagged, which indicates critical or severe threats based on threat intelligence by Detective. This indicator is derived from Amazon Web Services threat intelligence.

            • IpAddress — (String)

              IP address of the suspicious entity.

            • Reason — (String)

              Details the reason the IP address was flagged as suspicious.

              Possible values include:
              • "AWS_THREAT_INTELLIGENCE"
          • NewGeolocationDetail — (map)

            Contains details about the new geographic location.

            • Location — (String)

              Location where the resource was accessed.

            • IpAddress — (String)

              IP address using which the resource was accessed.

            • IsNewForEntireAccount — (Boolean)

              Checks if the geolocation is new for the entire account.

          • NewAsoDetail — (map)

            Contains details about the new Autonomous System Organization (ASO).

            • Aso — (String)

              Details about the new Autonomous System Organization (ASO).

            • IsNewForEntireAccount — (Boolean)

              Checks if the Autonomous System Organization (ASO) is new for the entire account.

          • NewUserAgentDetail — (map)

            Contains details about the new user agent.

            • UserAgent — (String)

              New user agent which accessed the resource.

            • IsNewForEntireAccount — (Boolean)

              Checks if the user agent is new for the entire account.

          • RelatedFindingDetail — (map)

            Contains details about related findings.

            • Arn — (String)

              The Amazon Resource Name (ARN) of the related finding.

            • Type — (String)

              The type of finding.

            • IpAddress — (String)

              The IP address of the finding.

          • RelatedFindingGroupDetail — (map)

            Contains details about related finding groups.

            • Id — (String)

              The unique identifier for the finding group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listInvestigations(params = {}, callback) ⇒ AWS.Request

Detective investigations lets you investigate IAM users and IAM roles using indicators of compromise. An indicator of compromise (IOC) is an artifact observed in or on a network, system, or environment that can (with a high level of confidence) identify malicious activity or a security incident. ListInvestigations lists all active Detective investigations.

Service Reference:

Examples:

Calling the listInvestigations operation

var params = {
  GraphArn: 'STRING_VALUE', /* required */
  FilterCriteria: {
    CreatedTime: {
      EndInclusive: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
      StartInclusive: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789 /* required */
    },
    EntityArn: {
      Value: 'STRING_VALUE' /* required */
    },
    Severity: {
      Value: 'STRING_VALUE' /* required */
    },
    State: {
      Value: 'STRING_VALUE' /* required */
    },
    Status: {
      Value: 'STRING_VALUE' /* required */
    }
  },
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  SortCriteria: {
    Field: SEVERITY | STATUS | CREATED_TIME,
    SortOrder: ASC | DESC
  }
};
detective.listInvestigations(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The Amazon Resource Name (ARN) of the behavior graph.

    • NextToken — (String)

      Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged.

      Each pagination token expires after 24 hours. Using an expired pagination token will return a Validation Exception error.

    • MaxResults — (Integer)

      Lists the maximum number of investigations in a page.

    • FilterCriteria — (map)

      Filters the investigation results based on a criteria.

      • Severity — (map)

        Filter the investigation results based on the severity.

        • Valuerequired — (String)

          The string filter value.

      • Status — (map)

        Filter the investigation results based on the status.

        • Valuerequired — (String)

          The string filter value.

      • State — (map)

        Filter the investigation results based on the state.

        • Valuerequired — (String)

          The string filter value.

      • EntityArn — (map)

        Filter the investigation results based on the Amazon Resource Name (ARN) of the entity.

        • Valuerequired — (String)

          The string filter value.

      • CreatedTime — (map)

        Filter the investigation results based on when the investigation was created.

        • StartInclusiverequired — (Date)

          A timestamp representing the start of the time period from when data is filtered, including the start date.

        • EndInclusiverequired — (Date)

          A timestamp representing the end date of the time period until when data is filtered, including the end date.

    • SortCriteria — (map)

      Sorts the investigation results based on a criteria.

      • Field — (String)

        Represents the Field attribute to sort investigations.

        Possible values include:
        • "SEVERITY"
        • "STATUS"
        • "CREATED_TIME"
      • SortOrder — (String)

        The order by which the sorted findings are displayed.

        Possible values include:
        • "ASC"
        • "DESC"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • InvestigationDetails — (Array<map>)

        Lists the summary of uncommon behavior or malicious activity which indicates a compromise.

        • InvestigationId — (String)

          The investigation ID of the investigation report.

        • Severity — (String)

          Severity based on the likelihood and impact of the indicators of compromise discovered in the investigation.

          Possible values include:
          • "INFORMATIONAL"
          • "LOW"
          • "MEDIUM"
          • "HIGH"
          • "CRITICAL"
        • Status — (String)

          Status based on the completion status of the investigation.

          Possible values include:
          • "RUNNING"
          • "FAILED"
          • "SUCCESSFUL"
        • State — (String)

          The current state of the investigation. An archived investigation indicates you have completed reviewing the investigation.

          Possible values include:
          • "ACTIVE"
          • "ARCHIVED"
        • CreatedTime — (Date)

          The time stamp of the creation time of the investigation report. The value is an UTC ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • EntityArn — (String)

          The unique Amazon Resource Name (ARN) of the IAM user and IAM role.

        • EntityType — (String)

          Type of entity. For example, Amazon Web Services accounts, such as IAM user and role.

          Possible values include:
          • "IAM_ROLE"
          • "IAM_USER"
      • NextToken — (String)

        Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged.

        Each pagination token expires after 24 hours.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listInvitations(params = {}, callback) ⇒ AWS.Request

Retrieves the list of open and accepted behavior graph invitations for the member account. This operation can only be called by an invited member account.

Open invitations are invitations that the member account has not responded to.

The results do not include behavior graphs for which the member account declined the invitation. The results also do not include behavior graphs that the member account resigned from or was removed from.

Service Reference:

Examples:

Calling the listInvitations operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
detective.listInvitations(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      For requests to retrieve the next page of results, the pagination token that was returned with the previous page of results. The initial request does not include a pagination token.

    • MaxResults — (Integer)

      The maximum number of behavior graph invitations to return in the response. The total must be less than the overall limit on the number of results to return, which is currently 200.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Invitations — (Array<map>)

        The list of behavior graphs for which the member account has open or accepted invitations.

        • AccountId — (String)

          The Amazon Web Services account identifier for the member account.

        • EmailAddress — (String)

          The Amazon Web Services account root user email address for the member account.

        • GraphArn — (String)

          The ARN of the behavior graph.

        • MasterId — (String)

          The Amazon Web Services account identifier of the administrator account for the behavior graph.

        • AdministratorId — (String)

          The Amazon Web Services account identifier of the administrator account for the behavior graph.

        • Status — (String)

          The current membership status of the member account. The status can have one of the following values:

          • INVITED - For invited accounts only. Indicates that the member was sent an invitation but has not yet responded.

          • VERIFICATION_IN_PROGRESS - For invited accounts only, indicates that Detective is verifying that the account identifier and email address provided for the member account match. If they do match, then Detective sends the invitation. If the email address and account identifier don't match, then the member cannot be added to the behavior graph.

            For organization accounts in the organization behavior graph, indicates that Detective is verifying that the account belongs to the organization.

          • VERIFICATION_FAILED - For invited accounts only. Indicates that the account and email address provided for the member account do not match, and Detective did not send an invitation to the account.

          • ENABLED - Indicates that the member account currently contributes data to the behavior graph. For invited accounts, the member account accepted the invitation. For organization accounts in the organization behavior graph, the Detective administrator account enabled the organization account as a member account.

          • ACCEPTED_BUT_DISABLED - The account accepted the invitation, or was enabled by the Detective administrator account, but is prevented from contributing data to the behavior graph. DisabledReason provides the reason why the member account is not enabled.

          Invited accounts that declined an invitation or that were removed from the behavior graph are not included. In the organization behavior graph, organization accounts that the Detective administrator account did not enable are not included.

          Possible values include:
          • "INVITED"
          • "VERIFICATION_IN_PROGRESS"
          • "VERIFICATION_FAILED"
          • "ENABLED"
          • "ACCEPTED_BUT_DISABLED"
        • DisabledReason — (String)

          For member accounts with a status of ACCEPTED_BUT_DISABLED, the reason that the member account is not enabled.

          The reason can have one of the following values:

          • VOLUME_TOO_HIGH - Indicates that adding the member account would cause the data volume for the behavior graph to be too high.

          • VOLUME_UNKNOWN - Indicates that Detective is unable to verify the data volume for the member account. This is usually because the member account is not enrolled in Amazon GuardDuty.

          Possible values include:
          • "VOLUME_TOO_HIGH"
          • "VOLUME_UNKNOWN"
        • InvitedTime — (Date)

          For invited accounts, the date and time that Detective sent the invitation to the account. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • UpdatedTime — (Date)

          The date and time that the member account was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • VolumeUsageInBytes — (Integer)

          The data volume in bytes per day for the member account.

        • VolumeUsageUpdatedTime — (Date)

          The data and time when the member account data volume was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • PercentOfGraphUtilization — (Float)

          The member account data volume as a percentage of the maximum allowed data volume. 0 indicates 0 percent, and 100 indicates 100 percent.

          Note that this is not the percentage of the behavior graph data volume.

          For example, the data volume for the behavior graph is 80 GB per day. The maximum data volume is 160 GB per day. If the data volume for the member account is 40 GB per day, then PercentOfGraphUtilization is 25. It represents 25% of the maximum allowed data volume.

        • PercentOfGraphUtilizationUpdatedTime — (Date)

          The date and time when the graph utilization percentage was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • InvitationType — (String)

          The type of behavior graph membership.

          For an organization account in the organization behavior graph, the type is ORGANIZATION.

          For an account that was invited to a behavior graph, the type is INVITATION.

          Possible values include:
          • "INVITATION"
          • "ORGANIZATION"
        • VolumeUsageByDatasourcePackage — (map<map>)

          Details on the volume of usage for each data source package in a behavior graph.

          • VolumeUsageInBytes — (Integer)

            Total volume of data in bytes per day ingested for a given data source package.

          • VolumeUsageUpdateTime — (Date)

            The data and time when the member account data volume was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • DatasourcePackageIngestStates — (map<String>)

          The state of a data source package for the behavior graph.

      • NextToken — (String)

        If there are more behavior graphs remaining in the results, then this is the pagination token to use to request the next page of behavior graphs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listMembers(params = {}, callback) ⇒ AWS.Request

Retrieves the list of member accounts for a behavior graph.

For invited accounts, the results do not include member accounts that were removed from the behavior graph.

For the organization behavior graph, the results do not include organization accounts that the Detective administrator account has not enabled as member accounts.

Service Reference:

Examples:

Calling the listMembers operation

var params = {
  GraphArn: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
detective.listMembers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the behavior graph for which to retrieve the list of member accounts.

    • NextToken — (String)

      For requests to retrieve the next page of member account results, the pagination token that was returned with the previous page of results. The initial request does not include a pagination token.

    • MaxResults — (Integer)

      The maximum number of member accounts to include in the response. The total must be less than the overall limit on the number of results to return, which is currently 200.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MemberDetails — (Array<map>)

        The list of member accounts in the behavior graph.

        For invited accounts, the results include member accounts that did not pass verification and member accounts that have not yet accepted the invitation to the behavior graph. The results do not include member accounts that were removed from the behavior graph.

        For the organization behavior graph, the results do not include organization accounts that the Detective administrator account has not enabled as member accounts.

        • AccountId — (String)

          The Amazon Web Services account identifier for the member account.

        • EmailAddress — (String)

          The Amazon Web Services account root user email address for the member account.

        • GraphArn — (String)

          The ARN of the behavior graph.

        • MasterId — (String)

          The Amazon Web Services account identifier of the administrator account for the behavior graph.

        • AdministratorId — (String)

          The Amazon Web Services account identifier of the administrator account for the behavior graph.

        • Status — (String)

          The current membership status of the member account. The status can have one of the following values:

          • INVITED - For invited accounts only. Indicates that the member was sent an invitation but has not yet responded.

          • VERIFICATION_IN_PROGRESS - For invited accounts only, indicates that Detective is verifying that the account identifier and email address provided for the member account match. If they do match, then Detective sends the invitation. If the email address and account identifier don't match, then the member cannot be added to the behavior graph.

            For organization accounts in the organization behavior graph, indicates that Detective is verifying that the account belongs to the organization.

          • VERIFICATION_FAILED - For invited accounts only. Indicates that the account and email address provided for the member account do not match, and Detective did not send an invitation to the account.

          • ENABLED - Indicates that the member account currently contributes data to the behavior graph. For invited accounts, the member account accepted the invitation. For organization accounts in the organization behavior graph, the Detective administrator account enabled the organization account as a member account.

          • ACCEPTED_BUT_DISABLED - The account accepted the invitation, or was enabled by the Detective administrator account, but is prevented from contributing data to the behavior graph. DisabledReason provides the reason why the member account is not enabled.

          Invited accounts that declined an invitation or that were removed from the behavior graph are not included. In the organization behavior graph, organization accounts that the Detective administrator account did not enable are not included.

          Possible values include:
          • "INVITED"
          • "VERIFICATION_IN_PROGRESS"
          • "VERIFICATION_FAILED"
          • "ENABLED"
          • "ACCEPTED_BUT_DISABLED"
        • DisabledReason — (String)

          For member accounts with a status of ACCEPTED_BUT_DISABLED, the reason that the member account is not enabled.

          The reason can have one of the following values:

          • VOLUME_TOO_HIGH - Indicates that adding the member account would cause the data volume for the behavior graph to be too high.

          • VOLUME_UNKNOWN - Indicates that Detective is unable to verify the data volume for the member account. This is usually because the member account is not enrolled in Amazon GuardDuty.

          Possible values include:
          • "VOLUME_TOO_HIGH"
          • "VOLUME_UNKNOWN"
        • InvitedTime — (Date)

          For invited accounts, the date and time that Detective sent the invitation to the account. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • UpdatedTime — (Date)

          The date and time that the member account was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • VolumeUsageInBytes — (Integer)

          The data volume in bytes per day for the member account.

        • VolumeUsageUpdatedTime — (Date)

          The data and time when the member account data volume was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • PercentOfGraphUtilization — (Float)

          The member account data volume as a percentage of the maximum allowed data volume. 0 indicates 0 percent, and 100 indicates 100 percent.

          Note that this is not the percentage of the behavior graph data volume.

          For example, the data volume for the behavior graph is 80 GB per day. The maximum data volume is 160 GB per day. If the data volume for the member account is 40 GB per day, then PercentOfGraphUtilization is 25. It represents 25% of the maximum allowed data volume.

        • PercentOfGraphUtilizationUpdatedTime — (Date)

          The date and time when the graph utilization percentage was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • InvitationType — (String)

          The type of behavior graph membership.

          For an organization account in the organization behavior graph, the type is ORGANIZATION.

          For an account that was invited to a behavior graph, the type is INVITATION.

          Possible values include:
          • "INVITATION"
          • "ORGANIZATION"
        • VolumeUsageByDatasourcePackage — (map<map>)

          Details on the volume of usage for each data source package in a behavior graph.

          • VolumeUsageInBytes — (Integer)

            Total volume of data in bytes per day ingested for a given data source package.

          • VolumeUsageUpdateTime — (Date)

            The data and time when the member account data volume was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

        • DatasourcePackageIngestStates — (map<String>)

          The state of a data source package for the behavior graph.

      • NextToken — (String)

        If there are more member accounts remaining in the results, then use this pagination token to request the next page of member accounts.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listOrganizationAdminAccounts(params = {}, callback) ⇒ AWS.Request

Returns information about the Detective administrator account for an organization. Can only be called by the organization management account.

Service Reference:

Examples:

Calling the listOrganizationAdminAccounts operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
detective.listOrganizationAdminAccounts(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      For requests to get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.

    • MaxResults — (Integer)

      The maximum number of results to return.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Administrators — (Array<map>)

        The list of Detective administrator accounts.

        • AccountId — (String)

          The Amazon Web Services account identifier of the Detective administrator account for the organization.

        • GraphArn — (String)

          The ARN of the organization behavior graph.

        • DelegationTime — (Date)

          The date and time when the Detective administrator account was enabled. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

      • NextToken — (String)

        If there are more accounts remaining in the results, then this is the pagination token to use to request the next page of accounts.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Returns the tag values that are assigned to a behavior graph.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  ResourceArn: 'STRING_VALUE' /* required */
};
detective.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The ARN of the behavior graph for which to retrieve the tag values.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Tags — (map<String>)

        The tag values that are assigned to the behavior graph. The request returns up to 50 tag values.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

rejectInvitation(params = {}, callback) ⇒ AWS.Request

Rejects an invitation to contribute the account data to a behavior graph. This operation must be called by an invited member account that has the INVITED status.

RejectInvitation cannot be called by an organization account in the organization behavior graph. In the organization behavior graph, organization accounts do not receive an invitation.

Service Reference:

Examples:

Calling the rejectInvitation operation

var params = {
  GraphArn: 'STRING_VALUE' /* required */
};
detective.rejectInvitation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the behavior graph to reject the invitation to.

      The member account's current member status in the behavior graph must be INVITED.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startInvestigation(params = {}, callback) ⇒ AWS.Request

Detective investigations lets you investigate IAM users and IAM roles using indicators of compromise. An indicator of compromise (IOC) is an artifact observed in or on a network, system, or environment that can (with a high level of confidence) identify malicious activity or a security incident. StartInvestigation initiates an investigation on an entity in a behavior graph.

Service Reference:

Examples:

Calling the startInvestigation operation

var params = {
  EntityArn: 'STRING_VALUE', /* required */
  GraphArn: 'STRING_VALUE', /* required */
  ScopeEndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  ScopeStartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789 /* required */
};
detective.startInvestigation(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The Amazon Resource Name (ARN) of the behavior graph.

    • EntityArn — (String)

      The unique Amazon Resource Name (ARN) of the IAM user and IAM role.

    • ScopeStartTime — (Date)

      The data and time when the investigation began. The value is an UTC ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

    • ScopeEndTime — (Date)

      The data and time when the investigation ended. The value is an UTC ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • InvestigationId — (String)

        The investigation ID of the investigation report.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startMonitoringMember(params = {}, callback) ⇒ AWS.Request

Sends a request to enable data ingest for a member account that has a status of ACCEPTED_BUT_DISABLED.

For valid member accounts, the status is updated as follows.

  • If Detective enabled the member account, then the new status is ENABLED.

  • If Detective cannot enable the member account, the status remains ACCEPTED_BUT_DISABLED.

Service Reference:

Examples:

Calling the startMonitoringMember operation

var params = {
  AccountId: 'STRING_VALUE', /* required */
  GraphArn: 'STRING_VALUE' /* required */
};
detective.startMonitoringMember(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the behavior graph.

    • AccountId — (String)

      The account ID of the member account to try to enable.

      The account must be an invited member account with a status of ACCEPTED_BUT_DISABLED.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Applies tag values to a behavior graph.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  Tags: { /* required */
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
detective.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The ARN of the behavior graph to assign the tags to.

    • Tags — (map<String>)

      The tags to assign to the behavior graph. You can add up to 50 tags. For each tag, you provide the tag key and the tag value. Each tag key can contain up to 128 characters. Each tag value can contain up to 256 characters.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes tags from a behavior graph.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
detective.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The ARN of the behavior graph to remove the tags from.

    • TagKeys — (Array<String>)

      The tag keys of the tags to remove from the behavior graph. You can remove up to 50 tags at a time.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDatasourcePackages(params = {}, callback) ⇒ AWS.Request

Starts a data source packages for the behavior graph.

Service Reference:

Examples:

Calling the updateDatasourcePackages operation

var params = {
  DatasourcePackages: [ /* required */
    DETECTIVE_CORE | EKS_AUDIT | ASFF_SECURITYHUB_FINDING,
    /* more items */
  ],
  GraphArn: 'STRING_VALUE' /* required */
};
detective.updateDatasourcePackages(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the behavior graph.

    • DatasourcePackages — (Array<String>)

      The data source package start for the behavior graph.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateInvestigationState(params = {}, callback) ⇒ AWS.Request

Updates the state of an investigation.

Service Reference:

Examples:

Calling the updateInvestigationState operation

var params = {
  GraphArn: 'STRING_VALUE', /* required */
  InvestigationId: 'STRING_VALUE', /* required */
  State: ACTIVE | ARCHIVED /* required */
};
detective.updateInvestigationState(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The Amazon Resource Name (ARN) of the behavior graph.

    • InvestigationId — (String)

      The investigation ID of the investigation report.

    • State — (String)

      The current state of the investigation. An archived investigation indicates you have completed reviewing the investigation.

      Possible values include:
      • "ACTIVE"
      • "ARCHIVED"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateOrganizationConfiguration(params = {}, callback) ⇒ AWS.Request

Updates the configuration for the Organizations integration in the current Region. Can only be called by the Detective administrator account for the organization.

Service Reference:

Examples:

Calling the updateOrganizationConfiguration operation

var params = {
  GraphArn: 'STRING_VALUE', /* required */
  AutoEnable: true || false
};
detective.updateOrganizationConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GraphArn — (String)

      The ARN of the organization behavior graph.

    • AutoEnable — (Boolean)

      Indicates whether to automatically enable new organization accounts as member accounts in the organization behavior graph.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.