You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

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 analyze and investigate security issues across your Amazon Web Services (AWS) workloads. Detective automatically extracts time-based events such as login attempts, API calls, and network traffic from AWS CloudTrail and Amazon Virtual Private Cloud (Amazon VPC) flow logs. It also extracts findings detected by Amazon GuardDuty.

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

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

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

  • Enable and disable Detective. Enabling Detective creates a new behavior graph.

  • View the list of member accounts in a behavior graph.

  • Add member accounts to a behavior graph.

  • Remove member accounts from a behavior graph.

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

  • View the list of behavior graphs that they are invited to.

  • Accept an invitation to contribute to a behavior graph.

  • Decline an invitation to contribute to a behavior graph.

  • Remove their account from a behavior graph.

All API actions are logged as CloudTrail events. See Logging Detective API Calls with CloudTrail.

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'.

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.

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.

Before you try to enable Detective, make sure that your account has been enrolled in Amazon GuardDuty for at least 48 hours. If you do not meet this requirement, you cannot enable Detective. If you do meet the GuardDuty prerequisite, then when you make the request to enable Detective, it checks whether your data volume is within the Detective quota. If it exceeds the quota, then you cannot enable 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

Sends a request to invite the specified AWS accounts to be member accounts in the behavior graph. This operation can only be called by the 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.

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

The response separates the requested accounts into two lists:

  • The accounts that CreateMembers was able to start the verification for. This list includes member accounts that are being verified, that have passed verification and are to be invited, and that have failed verification.

  • 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 to invite the member accounts to contribute their data to.

    • 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 member accounts do not receive email notifications. By default, this is set to false, and the member accounts receive email notifications.

    • Accounts — (Array<map>)

      The list of AWS accounts to invite to become member accounts in the behavior graph. You can invite up to 50 accounts at a time. For each invited account, the account list contains the account identifier and the AWS account root user email address.

      • AccountIdrequired — (String)

        The account identifier of the AWS account.

      • EmailAddressrequired — (String)

        The AWS account root user email address for the AWS 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 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.

        • AccountId — (String)

          The AWS account identifier for the member account.

        • EmailAddress — (String)

          The AWS account root user email address for the member account.

        • GraphArn — (String)

          The ARN of the behavior graph that the member account was invited to.

        • MasterId — (String)

          The AWS account identifier of the administrator account for the behavior graph.

        • AdministratorId — (String)

          The AWS 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 - Indicates that the member was sent an invitation but has not yet responded.

          • VERIFICATION_IN_PROGRESS - 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.

          • VERIFICATION_FAILED - 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 accepted the invitation to contribute to the behavior graph.

          • ACCEPTED_BUT_DISABLED - Indicates that the member account accepted the invitation but is prevented from contributing data to the behavior graph. DisabledReason provides the reason why the member account is not enabled.

          Member accounts that declined an invitation or that were removed from the behavior graph 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)

          The date and time that Detective sent the invitation to the member account. The value is in milliseconds since the epoch.

        • UpdatedTime — (Date)

          The date and time that the member account was last updated. The value is in milliseconds since the epoch.

        • 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.

        • 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.

      • UnprocessedAccounts — (Array<map>)

        The list of accounts for which Detective was unable to process the invitation 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 AWS 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 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

Deletes one or more member accounts from the administrator account's behavior graph. This operation can only be called by a Detective administrator account. That account cannot use DeleteMembers to delete 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 delete members from.

    • AccountIds — (Array<String>)

      The list of AWS account identifiers for the member accounts to delete from the behavior graph. You can delete 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 AWS account identifiers for the member accounts that Detective successfully deleted from the behavior graph.

      • UnprocessedAccounts — (Array<map>)

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

        • AccountId — (String)

          The AWS 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.

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

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

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.

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 AWS 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 AWS account identifier for the member account.

        • EmailAddress — (String)

          The AWS account root user email address for the member account.

        • GraphArn — (String)

          The ARN of the behavior graph that the member account was invited to.

        • MasterId — (String)

          The AWS account identifier of the administrator account for the behavior graph.

        • AdministratorId — (String)

          The AWS 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 - Indicates that the member was sent an invitation but has not yet responded.

          • VERIFICATION_IN_PROGRESS - 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.

          • VERIFICATION_FAILED - 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 accepted the invitation to contribute to the behavior graph.

          • ACCEPTED_BUT_DISABLED - Indicates that the member account accepted the invitation but is prevented from contributing data to the behavior graph. DisabledReason provides the reason why the member account is not enabled.

          Member accounts that declined an invitation or that were removed from the behavior graph 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)

          The date and time that Detective sent the invitation to the member account. The value is in milliseconds since the epoch.

        • UpdatedTime — (Date)

          The date and time that the member account was last updated. The value is in milliseconds since the epoch.

        • 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.

        • 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.

      • 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 AWS 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.

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 in milliseconds since the epoch.

      • 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.

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 a 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 AWS account identifier for the member account.

        • EmailAddress — (String)

          The AWS account root user email address for the member account.

        • GraphArn — (String)

          The ARN of the behavior graph that the member account was invited to.

        • MasterId — (String)

          The AWS account identifier of the administrator account for the behavior graph.

        • AdministratorId — (String)

          The AWS 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 - Indicates that the member was sent an invitation but has not yet responded.

          • VERIFICATION_IN_PROGRESS - 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.

          • VERIFICATION_FAILED - 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 accepted the invitation to contribute to the behavior graph.

          • ACCEPTED_BUT_DISABLED - Indicates that the member account accepted the invitation but is prevented from contributing data to the behavior graph. DisabledReason provides the reason why the member account is not enabled.

          Member accounts that declined an invitation or that were removed from the behavior graph 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)

          The date and time that Detective sent the invitation to the member account. The value is in milliseconds since the epoch.

        • UpdatedTime — (Date)

          The date and time that the member account was last updated. The value is in milliseconds since the epoch.

        • 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.

        • 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.

      • 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. Does not return member accounts that were removed from the behavior graph.

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.

        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.

        • AccountId — (String)

          The AWS account identifier for the member account.

        • EmailAddress — (String)

          The AWS account root user email address for the member account.

        • GraphArn — (String)

          The ARN of the behavior graph that the member account was invited to.

        • MasterId — (String)

          The AWS account identifier of the administrator account for the behavior graph.

        • AdministratorId — (String)

          The AWS 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 - Indicates that the member was sent an invitation but has not yet responded.

          • VERIFICATION_IN_PROGRESS - 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.

          • VERIFICATION_FAILED - 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 accepted the invitation to contribute to the behavior graph.

          • ACCEPTED_BUT_DISABLED - Indicates that the member account accepted the invitation but is prevented from contributing data to the behavior graph. DisabledReason provides the reason why the member account is not enabled.

          Member accounts that declined an invitation or that were removed from the behavior graph 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)

          The date and time that Detective sent the invitation to the member account. The value is in milliseconds since the epoch.

        • UpdatedTime — (Date)

          The date and time that the member account was last updated. The value is in milliseconds since the epoch.

        • 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.

        • 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.

      • NextToken — (String)

        If there are more member accounts remaining in the results, then this is the pagination token to use to request the next page of member 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 a member account that has the INVITED status.

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.

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.