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

Inherits:
AWS.Service show all
Identifier:
frauddetector
API Version:
2019-11-15
Defined in:
(unknown)

Overview

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

Service Description

This is the Amazon Fraud Detector API Reference. This guide is for developers who need detailed information about Amazon Fraud Detector API actions, data types, and errors. For more information about Amazon Fraud Detector features, see the Amazon Fraud Detector User Guide.

Sending a Request Using FraudDetector

var frauddetector = new AWS.FraudDetector();
frauddetector.batchCreateVariable(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 FraudDetector object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var frauddetector = new AWS.FraudDetector({apiVersion: '2019-11-15'});

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

AWS.config.apiVersions = {
  frauddetector: '2019-11-15',
  // other service API versions
};

var frauddetector = new AWS.FraudDetector();

Version:

  • 2019-11-15

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.FraudDetector(options = {}) ⇒ Object

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

Examples:

Constructing a FraudDetector object

var frauddetector = new AWS.FraudDetector({apiVersion: '2019-11-15'});

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.FraudDetector.region for more information.

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.FraudDetector.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

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

Creates a batch of variables.

Service Reference:

Examples:

Calling the batchCreateVariable operation

var params = {
  variableEntries: [ /* required */
    {
      dataSource: 'STRING_VALUE',
      dataType: 'STRING_VALUE',
      defaultValue: 'STRING_VALUE',
      description: 'STRING_VALUE',
      name: 'STRING_VALUE',
      variableType: 'STRING_VALUE'
    },
    /* more items */
  ],
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.batchCreateVariable(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: {})
    • variableEntries — (Array<map>)

      The list of variables for the batch create variable request.

      • name — (String)

        The name of the variable.

      • dataType — (String)

        The data type of the variable.

      • dataSource — (String)

        The data source of the variable.

      • defaultValue — (String)

        The default value of the variable.

      • description — (String)

        The description of the variable.

      • variableType — (String)

        The type of the variable. For more information see Variable types.

        Valid Values: AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT

    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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:

      • errors — (Array<map>)

        Provides the errors for the BatchCreateVariable request.

        • name — (String)

          The name.

        • code — (Integer)

          The error code.

        • message — (String)

          The error message.

Returns:

  • (AWS.Request)

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

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

Gets a batch of variables.

Service Reference:

Examples:

Calling the batchGetVariable operation

var params = {
  names: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
frauddetector.batchGetVariable(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: {})
    • names — (Array<String>)

      The list of variable names to get.

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:

      • variables — (Array<map>)

        The returned variables.

        • name — (String)

          The name of the variable.

        • dataType — (String)

          The data type of the variable. For more information see Variable types.

          Possible values include:
          • "STRING"
          • "INTEGER"
          • "FLOAT"
          • "BOOLEAN"
        • dataSource — (String)

          The data source of the variable.

          Possible values include:
          • "EVENT"
          • "MODEL_SCORE"
          • "EXTERNAL_MODEL_SCORE"
        • defaultValue — (String)

          The default value of the variable.

        • description — (String)

          The description of the variable.

        • variableType — (String)

          The variable type of the variable.

          Valid Values: AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT

        • lastUpdatedTime — (String)

          The time when variable was last updated.

        • createdTime — (String)

          The time when the variable was created.

        • arn — (String)

          The ARN of the variable.

      • errors — (Array<map>)

        The errors from the request.

        • name — (String)

          The error name.

        • code — (Integer)

          The error code.

        • message — (String)

          The error message.

Returns:

  • (AWS.Request)

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

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

Cancels an in-progress batch import job.

Service Reference:

Examples:

Calling the cancelBatchImportJob operation

var params = {
  jobId: 'STRING_VALUE' /* required */
};
frauddetector.cancelBatchImportJob(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: {})
    • jobId — (String)

      The ID of an in-progress batch import job to cancel.

      Amazon Fraud Detector will throw an error if the batch import job is in FAILED, CANCELED, or COMPLETED state.

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.

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

Cancels the specified batch prediction job.

Service Reference:

Examples:

Calling the cancelBatchPredictionJob operation

var params = {
  jobId: 'STRING_VALUE' /* required */
};
frauddetector.cancelBatchPredictionJob(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: {})
    • jobId — (String)

      The ID of the batch prediction job to cancel.

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.

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

Creates a batch import job.

Service Reference:

Examples:

Calling the createBatchImportJob operation

var params = {
  eventTypeName: 'STRING_VALUE', /* required */
  iamRoleArn: 'STRING_VALUE', /* required */
  inputPath: 'STRING_VALUE', /* required */
  jobId: 'STRING_VALUE', /* required */
  outputPath: 'STRING_VALUE', /* required */
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.createBatchImportJob(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: {})
    • jobId — (String)

      The ID of the batch import job. The ID cannot be of a past job, unless the job exists in CREATE_FAILED state.

    • inputPath — (String)

      The URI that points to the Amazon S3 location of your data file.

    • outputPath — (String)

      The URI that points to the Amazon S3 location for storing your results.

    • eventTypeName — (String)

      The name of the event type.

    • iamRoleArn — (String)

      The ARN of the IAM role created for Amazon S3 bucket that holds your data file. The IAM role must have read and write permissions to both input and output S3 buckets.

    • tags — (Array<map>)

      A collection of key-value pairs associated with this request.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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.

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

Creates a batch prediction job.

Service Reference:

Examples:

Calling the createBatchPredictionJob operation

var params = {
  detectorName: 'STRING_VALUE', /* required */
  eventTypeName: 'STRING_VALUE', /* required */
  iamRoleArn: 'STRING_VALUE', /* required */
  inputPath: 'STRING_VALUE', /* required */
  jobId: 'STRING_VALUE', /* required */
  outputPath: 'STRING_VALUE', /* required */
  detectorVersion: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.createBatchPredictionJob(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: {})
    • jobId — (String)

      The ID of the batch prediction job.

    • inputPath — (String)

      The Amazon S3 location of your training file.

    • outputPath — (String)

      The Amazon S3 location of your output file.

    • eventTypeName — (String)

      The name of the event type.

    • detectorName — (String)

      The name of the detector.

    • detectorVersion — (String)

      The detector version.

    • iamRoleArn — (String)

      The ARN of the IAM role to use for this job request.

    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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.

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

Creates a detector version. The detector version starts in a DRAFT status.

Service Reference:

Examples:

Calling the createDetectorVersion operation

var params = {
  detectorId: 'STRING_VALUE', /* required */
  rules: [ /* required */
    {
      detectorId: 'STRING_VALUE', /* required */
      ruleId: 'STRING_VALUE', /* required */
      ruleVersion: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  description: 'STRING_VALUE',
  externalModelEndpoints: [
    'STRING_VALUE',
    /* more items */
  ],
  modelVersions: [
    {
      modelId: 'STRING_VALUE', /* required */
      modelType: ONLINE_FRAUD_INSIGHTS | TRANSACTION_FRAUD_INSIGHTS, /* required */
      modelVersionNumber: 'STRING_VALUE', /* required */
      arn: 'STRING_VALUE'
    },
    /* more items */
  ],
  ruleExecutionMode: ALL_MATCHED | FIRST_MATCHED,
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.createDetectorVersion(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: {})
    • detectorId — (String)

      The ID of the detector under which you want to create a new version.

    • description — (String)

      The description of the detector version.

    • externalModelEndpoints — (Array<String>)

      The Amazon Sagemaker model endpoints to include in the detector version.

    • rules — (Array<map>)

      The rules to include in the detector version.

      • detectorIdrequired — (String)

        The detector for which the rule is associated.

      • ruleIdrequired — (String)

        The rule ID.

      • ruleVersionrequired — (String)

        The rule version.

    • modelVersions — (Array<map>)

      The model versions to include in the detector version.

      • modelIdrequired — (String)

        The model ID.

      • modelTyperequired — (String)

        The model type.

        Possible values include:
        • "ONLINE_FRAUD_INSIGHTS"
        • "TRANSACTION_FRAUD_INSIGHTS"
      • modelVersionNumberrequired — (String)

        The model version number.

      • arn — (String)

        The model version ARN.

    • ruleExecutionMode — (String)

      The rule execution mode for the rules included in the detector version.

      You can define and edit the rule mode at the detector version level, when it is in draft status.

      If you specify FIRST_MATCHED, Amazon Fraud Detector evaluates rules sequentially, first to last, stopping at the first matched rule. Amazon Fraud dectector then provides the outcomes for that single rule.

      If you specifiy ALL_MATCHED, Amazon Fraud Detector evaluates all rules and returns the outcomes for all matched rules.

      The default behavior is FIRST_MATCHED.

      Possible values include:
      • "ALL_MATCHED"
      • "FIRST_MATCHED"
    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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:

      • detectorId — (String)

        The ID for the created version's parent detector.

      • detectorVersionId — (String)

        The ID for the created detector.

      • status — (String)

        The status of the detector version.

        Possible values include:
        • "DRAFT"
        • "ACTIVE"
        • "INACTIVE"

Returns:

  • (AWS.Request)

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

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

Creates a model using the specified model type.

Service Reference:

Examples:

Calling the createModel operation

var params = {
  eventTypeName: 'STRING_VALUE', /* required */
  modelId: 'STRING_VALUE', /* required */
  modelType: ONLINE_FRAUD_INSIGHTS | TRANSACTION_FRAUD_INSIGHTS, /* required */
  description: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.createModel(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: {})
    • modelId — (String)

      The model ID.

    • modelType — (String)

      The model type.

      Possible values include:
      • "ONLINE_FRAUD_INSIGHTS"
      • "TRANSACTION_FRAUD_INSIGHTS"
    • description — (String)

      The model description.

    • eventTypeName — (String)

      The name of the event type.

    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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.

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

Creates a version of the model using the specified model type and model id.

Service Reference:

Examples:

Calling the createModelVersion operation

var params = {
  modelId: 'STRING_VALUE', /* required */
  modelType: ONLINE_FRAUD_INSIGHTS | TRANSACTION_FRAUD_INSIGHTS, /* required */
  trainingDataSchema: { /* required */
    labelSchema: { /* required */
      labelMapper: { /* required */
        '<string>': [
          'STRING_VALUE',
          /* more items */
        ],
        /* '<string>': ... */
      },
      unlabeledEventsTreatment: IGNORE | FRAUD | LEGIT
    },
    modelVariables: [ /* required */
      'STRING_VALUE',
      /* more items */
    ]
  },
  trainingDataSource: EXTERNAL_EVENTS | INGESTED_EVENTS, /* required */
  externalEventsDetail: {
    dataAccessRoleArn: 'STRING_VALUE', /* required */
    dataLocation: 'STRING_VALUE' /* required */
  },
  ingestedEventsDetail: {
    ingestedEventsTimeWindow: { /* required */
      endTime: 'STRING_VALUE', /* required */
      startTime: 'STRING_VALUE' /* required */
    }
  },
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.createModelVersion(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: {})
    • modelId — (String)

      The model ID.

    • modelType — (String)

      The model type.

      Possible values include:
      • "ONLINE_FRAUD_INSIGHTS"
      • "TRANSACTION_FRAUD_INSIGHTS"
    • trainingDataSource — (String)

      The training data source location in Amazon S3.

      Possible values include:
      • "EXTERNAL_EVENTS"
      • "INGESTED_EVENTS"
    • trainingDataSchema — (map)

      The training data schema.

      • modelVariablesrequired — (Array<String>)

        The training data schema variables.

      • labelSchemarequired — (map)

        The label schema.

        • labelMapperrequired — (map<Array<String>>)

          The label mapper maps the Amazon Fraud Detector supported model classification labels (FRAUD, LEGIT) to the appropriate event type labels. For example, if "FRAUD" and "LEGIT" are Amazon Fraud Detector supported labels, this mapper could be: {"FRAUD" => ["0"], "LEGIT" => ["1"]} or {"FRAUD" => ["false"], "LEGIT" => ["true"]} or {"FRAUD" => ["fraud", "abuse"], "LEGIT" => ["legit", "safe"]}. The value part of the mapper is a list, because you may have multiple label variants from your event type for a single Amazon Fraud Detector label.

        • unlabeledEventsTreatment — (String)

          The action to take for unlabeled events.

          Possible values include:
          • "IGNORE"
          • "FRAUD"
          • "LEGIT"
    • externalEventsDetail — (map)

      Details of the external events data used for model version training. Required if trainingDataSource is EXTERNAL_EVENTS.

      • dataLocationrequired — (String)

        The Amazon S3 bucket location for the data.

      • dataAccessRoleArnrequired — (String)

        The ARN of the role that provides Amazon Fraud Detector access to the data location.

    • ingestedEventsDetail — (map)

      Details of the ingested events data used for model version training. Required if trainingDataSource is INGESTED_EVENTS.

      • ingestedEventsTimeWindowrequired — (map)

        The start and stop time of the ingested events.

        • startTimerequired — (String)

          Timestamp of the first ingensted event.

        • endTimerequired — (String)

          Timestamp of the final ingested event.

    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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:

      • modelId — (String)

        The model ID.

      • modelType — (String)

        The model type.

        Possible values include:
        • "ONLINE_FRAUD_INSIGHTS"
        • "TRANSACTION_FRAUD_INSIGHTS"
      • modelVersionNumber — (String)

        The model version number of the model version created.

      • status — (String)

        The model version status.

Returns:

  • (AWS.Request)

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

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

Creates a rule for use with the specified detector.

Service Reference:

Examples:

Calling the createRule operation

var params = {
  detectorId: 'STRING_VALUE', /* required */
  expression: 'STRING_VALUE', /* required */
  language: DETECTORPL, /* required */
  outcomes: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  ruleId: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.createRule(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: {})
    • ruleId — (String)

      The rule ID.

    • detectorId — (String)

      The detector ID for the rule's parent detector.

    • description — (String)

      The rule description.

    • expression — (String)

      The rule expression.

    • language — (String)

      The language of the rule.

      Possible values include:
      • "DETECTORPL"
    • outcomes — (Array<String>)

      The outcome or outcomes returned when the rule expression matches.

    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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:

      • rule — (map)

        The created rule.

        • detectorIdrequired — (String)

          The detector for which the rule is associated.

        • ruleIdrequired — (String)

          The rule ID.

        • ruleVersionrequired — (String)

          The rule version.

Returns:

  • (AWS.Request)

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

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

Creates a variable.

Service Reference:

Examples:

Calling the createVariable operation

var params = {
  dataSource: EVENT | MODEL_SCORE | EXTERNAL_MODEL_SCORE, /* required */
  dataType: STRING | INTEGER | FLOAT | BOOLEAN, /* required */
  defaultValue: 'STRING_VALUE', /* required */
  name: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  variableType: 'STRING_VALUE'
};
frauddetector.createVariable(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: {})
    • name — (String)

      The name of the variable.

    • dataType — (String)

      The data type.

      Possible values include:
      • "STRING"
      • "INTEGER"
      • "FLOAT"
      • "BOOLEAN"
    • dataSource — (String)

      The source of the data.

      Possible values include:
      • "EVENT"
      • "MODEL_SCORE"
      • "EXTERNAL_MODEL_SCORE"
    • defaultValue — (String)

      The default value for the variable when no value is received.

    • description — (String)

      The description.

    • variableType — (String)

      The variable type. For more information see Variable types.

      Valid Values: AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT

    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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.

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

Deletes data that was batch imported to Amazon Fraud Detector.

Service Reference:

Examples:

Calling the deleteBatchImportJob operation

var params = {
  jobId: 'STRING_VALUE' /* required */
};
frauddetector.deleteBatchImportJob(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: {})
    • jobId — (String)

      The ID of the batch import job to delete.

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.

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

Deletes a batch prediction job.

Service Reference:

Examples:

Calling the deleteBatchPredictionJob operation

var params = {
  jobId: 'STRING_VALUE' /* required */
};
frauddetector.deleteBatchPredictionJob(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: {})
    • jobId — (String)

      The ID of the batch prediction job to delete.

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.

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

Deletes the detector. Before deleting a detector, you must first delete all detector versions and rule versions associated with the detector.

When you delete a detector, Amazon Fraud Detector permanently deletes the detector and the data is no longer stored in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the deleteDetector operation

var params = {
  detectorId: 'STRING_VALUE' /* required */
};
frauddetector.deleteDetector(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: {})
    • detectorId — (String)

      The ID of the detector to delete.

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.

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

Deletes the detector version. You cannot delete detector versions that are in ACTIVE status.

When you delete a detector version, Amazon Fraud Detector permanently deletes the detector and the data is no longer stored in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the deleteDetectorVersion operation

var params = {
  detectorId: 'STRING_VALUE', /* required */
  detectorVersionId: 'STRING_VALUE' /* required */
};
frauddetector.deleteDetectorVersion(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: {})
    • detectorId — (String)

      The ID of the parent detector for the detector version to delete.

    • detectorVersionId — (String)

      The ID of the detector version to delete.

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.

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

Deletes an entity type.

You cannot delete an entity type that is included in an event type.

When you delete an entity type, Amazon Fraud Detector permanently deletes that entity type and the data is no longer stored in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the deleteEntityType operation

var params = {
  name: 'STRING_VALUE' /* required */
};
frauddetector.deleteEntityType(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: {})
    • name — (String)

      The name of the entity type to delete.

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.

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

Deletes the specified event.

When you delete an event, Amazon Fraud Detector permanently deletes that event and the event data is no longer stored in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the deleteEvent operation

var params = {
  eventId: 'STRING_VALUE', /* required */
  eventTypeName: 'STRING_VALUE', /* required */
  deleteAuditHistory: true || false
};
frauddetector.deleteEvent(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: {})
    • eventId — (String)

      The ID of the event to delete.

    • eventTypeName — (String)

      The name of the event type.

    • deleteAuditHistory — (Boolean)

      Specifies whether or not to delete any predictions associated with the event.

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.

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

Deletes all events of a particular event type.

Service Reference:

Examples:

Calling the deleteEventsByEventType operation

var params = {
  eventTypeName: 'STRING_VALUE' /* required */
};
frauddetector.deleteEventsByEventType(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: {})
    • eventTypeName — (String)

      The name of the event type.

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:

      • eventTypeName — (String)

        Name of event type for which to delete the events.

      • eventsDeletionStatus — (String)

        The status of the delete request.

Returns:

  • (AWS.Request)

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

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

Deletes an event type.

You cannot delete an event type that is used in a detector or a model.

When you delete an event type, Amazon Fraud Detector permanently deletes that event type and the data is no longer stored in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the deleteEventType operation

var params = {
  name: 'STRING_VALUE' /* required */
};
frauddetector.deleteEventType(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: {})
    • name — (String)

      The name of the event type to delete.

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.

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

Removes a SageMaker model from Amazon Fraud Detector.

You can remove an Amazon SageMaker model if it is not associated with a detector version. Removing a SageMaker model disconnects it from Amazon Fraud Detector, but the model remains available in SageMaker.

Service Reference:

Examples:

Calling the deleteExternalModel operation

var params = {
  modelEndpoint: 'STRING_VALUE' /* required */
};
frauddetector.deleteExternalModel(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: {})
    • modelEndpoint — (String)

      The endpoint of the Amazon Sagemaker model to delete.

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.

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

Deletes a label.

You cannot delete labels that are included in an event type in Amazon Fraud Detector.

You cannot delete a label assigned to an event ID. You must first delete the relevant event ID.

When you delete a label, Amazon Fraud Detector permanently deletes that label and the data is no longer stored in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the deleteLabel operation

var params = {
  name: 'STRING_VALUE' /* required */
};
frauddetector.deleteLabel(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: {})
    • name — (String)

      The name of the label to delete.

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.

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

Deletes a model.

You can delete models and model versions in Amazon Fraud Detector, provided that they are not associated with a detector version.

When you delete a model, Amazon Fraud Detector permanently deletes that model and the data is no longer stored in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the deleteModel operation

var params = {
  modelId: 'STRING_VALUE', /* required */
  modelType: ONLINE_FRAUD_INSIGHTS | TRANSACTION_FRAUD_INSIGHTS /* required */
};
frauddetector.deleteModel(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: {})
    • modelId — (String)

      The model ID of the model to delete.

    • modelType — (String)

      The model type of the model to delete.

      Possible values include:
      • "ONLINE_FRAUD_INSIGHTS"
      • "TRANSACTION_FRAUD_INSIGHTS"

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.

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

Deletes a model version.

You can delete models and model versions in Amazon Fraud Detector, provided that they are not associated with a detector version.

When you delete a model version, Amazon Fraud Detector permanently deletes that model version and the data is no longer stored in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the deleteModelVersion operation

var params = {
  modelId: 'STRING_VALUE', /* required */
  modelType: ONLINE_FRAUD_INSIGHTS | TRANSACTION_FRAUD_INSIGHTS, /* required */
  modelVersionNumber: 'STRING_VALUE' /* required */
};
frauddetector.deleteModelVersion(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: {})
    • modelId — (String)

      The model ID of the model version to delete.

    • modelType — (String)

      The model type of the model version to delete.

      Possible values include:
      • "ONLINE_FRAUD_INSIGHTS"
      • "TRANSACTION_FRAUD_INSIGHTS"
    • modelVersionNumber — (String)

      The model version number of the model version to delete.

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.

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

Deletes an outcome.

You cannot delete an outcome that is used in a rule version.

When you delete an outcome, Amazon Fraud Detector permanently deletes that outcome and the data is no longer stored in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the deleteOutcome operation

var params = {
  name: 'STRING_VALUE' /* required */
};
frauddetector.deleteOutcome(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: {})
    • name — (String)

      The name of the outcome to delete.

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.

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

Deletes the rule. You cannot delete a rule if it is used by an ACTIVE or INACTIVE detector version.

When you delete a rule, Amazon Fraud Detector permanently deletes that rule and the data is no longer stored in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the deleteRule operation

var params = {
  rule: { /* required */
    detectorId: 'STRING_VALUE', /* required */
    ruleId: 'STRING_VALUE', /* required */
    ruleVersion: 'STRING_VALUE' /* required */
  }
};
frauddetector.deleteRule(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: {})
    • rule — (map)

      A rule.

      • detectorIdrequired — (String)

        The detector for which the rule is associated.

      • ruleIdrequired — (String)

        The rule ID.

      • ruleVersionrequired — (String)

        The rule version.

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.

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

Deletes a variable.

You can't delete variables that are included in an event type in Amazon Fraud Detector.

Amazon Fraud Detector automatically deletes model output variables and SageMaker model output variables when you delete the model. You can't delete these variables manually.

When you delete a variable, Amazon Fraud Detector permanently deletes that variable and the data is no longer stored in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the deleteVariable operation

var params = {
  name: 'STRING_VALUE' /* required */
};
frauddetector.deleteVariable(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: {})
    • name — (String)

      The name of the variable to delete.

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.

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

Gets all versions for a specified detector.

Service Reference:

Examples:

Calling the describeDetector operation

var params = {
  detectorId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
frauddetector.describeDetector(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: {})
    • detectorId — (String)

      The detector ID.

    • nextToken — (String)

      The next token from the previous response.

    • maxResults — (Integer)

      The maximum number of results to return for the request.

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:

      • detectorId — (String)

        The detector ID.

      • detectorVersionSummaries — (Array<map>)

        The status and description for each detector version.

        • detectorVersionId — (String)

          The detector version ID.

        • status — (String)

          The detector version status.

          Possible values include:
          • "DRAFT"
          • "ACTIVE"
          • "INACTIVE"
        • description — (String)

          The detector version description.

        • lastUpdatedTime — (String)

          Timestamp of when the detector version was last updated.

      • nextToken — (String)

        The next token to be used for subsequent requests.

      • arn — (String)

        The detector ARN.

Returns:

  • (AWS.Request)

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

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

Gets all of the model versions for the specified model type or for the specified model type and model ID. You can also get details for a single, specified model version.

Service Reference:

Examples:

Calling the describeModelVersions operation

var params = {
  maxResults: 'NUMBER_VALUE',
  modelId: 'STRING_VALUE',
  modelType: ONLINE_FRAUD_INSIGHTS | TRANSACTION_FRAUD_INSIGHTS,
  modelVersionNumber: 'STRING_VALUE',
  nextToken: 'STRING_VALUE'
};
frauddetector.describeModelVersions(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: {})
    • modelId — (String)

      The model ID.

    • modelVersionNumber — (String)

      The model version number.

    • modelType — (String)

      The model type.

      Possible values include:
      • "ONLINE_FRAUD_INSIGHTS"
      • "TRANSACTION_FRAUD_INSIGHTS"
    • nextToken — (String)

      The next token from the previous results.

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

      • modelVersionDetails — (Array<map>)

        The model version details.

        • modelId — (String)

          The model ID.

        • modelType — (String)

          The model type.

          Possible values include:
          • "ONLINE_FRAUD_INSIGHTS"
          • "TRANSACTION_FRAUD_INSIGHTS"
        • modelVersionNumber — (String)

          The model version number.

        • status — (String)

          The status of the model version.

        • trainingDataSource — (String)

          The model version training data source.

          Possible values include:
          • "EXTERNAL_EVENTS"
          • "INGESTED_EVENTS"
        • trainingDataSchema — (map)

          The training data schema.

          • modelVariablesrequired — (Array<String>)

            The training data schema variables.

          • labelSchemarequired — (map)

            The label schema.

            • labelMapperrequired — (map<Array<String>>)

              The label mapper maps the Amazon Fraud Detector supported model classification labels (FRAUD, LEGIT) to the appropriate event type labels. For example, if "FRAUD" and "LEGIT" are Amazon Fraud Detector supported labels, this mapper could be: {"FRAUD" => ["0"], "LEGIT" => ["1"]} or {"FRAUD" => ["false"], "LEGIT" => ["true"]} or {"FRAUD" => ["fraud", "abuse"], "LEGIT" => ["legit", "safe"]}. The value part of the mapper is a list, because you may have multiple label variants from your event type for a single Amazon Fraud Detector label.

            • unlabeledEventsTreatment — (String)

              The action to take for unlabeled events.

              Possible values include:
              • "IGNORE"
              • "FRAUD"
              • "LEGIT"
        • externalEventsDetail — (map)

          The external events data details. This will be populated if the trainingDataSource for the model version is specified as EXTERNAL_EVENTS.

          • dataLocationrequired — (String)

            The Amazon S3 bucket location for the data.

          • dataAccessRoleArnrequired — (String)

            The ARN of the role that provides Amazon Fraud Detector access to the data location.

        • ingestedEventsDetail — (map)

          The ingested events data details. This will be populated if the trainingDataSource for the model version is specified as INGESTED_EVENTS.

          • ingestedEventsTimeWindowrequired — (map)

            The start and stop time of the ingested events.

            • startTimerequired — (String)

              Timestamp of the first ingensted event.

            • endTimerequired — (String)

              Timestamp of the final ingested event.

        • trainingResult — (map)

          The training results.

          • dataValidationMetrics — (map)

            The validation metrics.

            • fileLevelMessages — (Array<map>)

              The file-specific model training validation messages.

              • title — (String)

                The message title.

              • content — (String)

                The message content.

              • type — (String)

                The message type.

            • fieldLevelMessages — (Array<map>)

              The field-specific model training validation messages.

              • fieldName — (String)

                The field name.

              • identifier — (String)

                The message ID.

              • title — (String)

                The message title.

              • content — (String)

                The message content.

              • type — (String)

                The message type.

          • trainingMetrics — (map)

            The training metric details.

            • auc — (Float)

              The area under the curve. This summarizes true positive rate (TPR) and false positive rate (FPR) across all possible model score thresholds. A model with no predictive power has an AUC of 0.5, whereas a perfect model has a score of 1.0.

            • metricDataPoints — (Array<map>)

              The data points details.

              • fpr — (Float)

                The false positive rate. This is the percentage of total legitimate events that are incorrectly predicted as fraud.

              • precision — (Float)

                The percentage of fraud events correctly predicted as fraudulent as compared to all events predicted as fraudulent.

              • tpr — (Float)

                The true positive rate. This is the percentage of total fraud the model detects. Also known as capture rate.

              • threshold — (Float)

                The model threshold that specifies an acceptable fraud capture rate. For example, a threshold of 500 means any model score 500 or above is labeled as fraud.

          • variableImportanceMetrics — (map)

            The variable importance metrics.

            • logOddsMetrics — (Array<map>)

              List of variable metrics.

              • variableNamerequired — (String)

                The name of the variable.

              • variableTyperequired — (String)

                The type of variable.

              • variableImportancerequired — (Float)

                The relative importance of the variable. For more information, see Model variable importance.

        • lastUpdatedTime — (String)

          The timestamp when the model was last updated.

        • createdTime — (String)

          The timestamp when the model was created.

        • arn — (String)

          The model version ARN.

      • nextToken — (String)

        The next token.

Returns:

  • (AWS.Request)

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

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

Gets all batch import jobs or a specific job of the specified ID. This is a paginated API. If you provide a null maxResults, this action retrieves a maximum of 50 records per page. If you provide a maxResults, the value must be between 1 and 50. To get the next page results, provide the pagination token from the GetBatchImportJobsResponse as part of your request. A null pagination token fetches the records from the beginning.

Service Reference:

Examples:

Calling the getBatchImportJobs operation

var params = {
  jobId: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
frauddetector.getBatchImportJobs(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: {})
    • jobId — (String)

      The ID of the batch import job to get.

    • maxResults — (Integer)

      The maximum number of objects to return for request.

    • nextToken — (String)

      The next token from the previous request.

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:

      • batchImports — (Array<map>)

        An array containing the details of each batch import job.

        • jobId — (String)

          The ID of the batch import job.

        • status — (String)

          The status of the batch import job.

          Possible values include:
          • "IN_PROGRESS_INITIALIZING"
          • "IN_PROGRESS"
          • "CANCEL_IN_PROGRESS"
          • "CANCELED"
          • "COMPLETE"
          • "FAILED"
        • failureReason — (String)

          The reason batch import job failed.

        • startTime — (String)

          Timestamp of when the batch import job started.

        • completionTime — (String)

          Timestamp of when batch import job completed.

        • inputPath — (String)

          The Amazon S3 location of your data file for batch import.

        • outputPath — (String)

          The Amazon S3 location of your output file.

        • eventTypeName — (String)

          The name of the event type.

        • iamRoleArn — (String)

          The ARN of the IAM role to use for this job request.

        • arn — (String)

          The ARN of the batch import job.

        • processedRecordsCount — (Integer)

          The number of records processed by batch import job.

        • failedRecordsCount — (Integer)

          The number of records that failed to import.

        • totalRecordsCount — (Integer)

          The total number of records in the batch import job.

      • nextToken — (String)

        The next token for the subsequent resquest.

Returns:

  • (AWS.Request)

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

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

Gets all batch prediction jobs or a specific job if you specify a job ID. This is a paginated API. If you provide a null maxResults, this action retrieves a maximum of 50 records per page. If you provide a maxResults, the value must be between 1 and 50. To get the next page results, provide the pagination token from the GetBatchPredictionJobsResponse as part of your request. A null pagination token fetches the records from the beginning.

Service Reference:

Examples:

Calling the getBatchPredictionJobs operation

var params = {
  jobId: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
frauddetector.getBatchPredictionJobs(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: {})
    • jobId — (String)

      The batch prediction job for which to get the details.

    • maxResults — (Integer)

      The maximum number of objects to return for the request.

    • nextToken — (String)

      The next token from the previous request.

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:

      • batchPredictions — (Array<map>)

        An array containing the details of each batch prediction job.

        • jobId — (String)

          The job ID for the batch prediction.

        • status — (String)

          The batch prediction status.

          Possible values include:
          • "IN_PROGRESS_INITIALIZING"
          • "IN_PROGRESS"
          • "CANCEL_IN_PROGRESS"
          • "CANCELED"
          • "COMPLETE"
          • "FAILED"
        • failureReason — (String)

          The reason a batch prediction job failed.

        • startTime — (String)

          Timestamp of when the batch prediction job started.

        • completionTime — (String)

          Timestamp of when the batch prediction job completed.

        • lastHeartbeatTime — (String)

          Timestamp of most recent heartbeat indicating the batch prediction job was making progress.

        • inputPath — (String)

          The Amazon S3 location of your training file.

        • outputPath — (String)

          The Amazon S3 location of your output file.

        • eventTypeName — (String)

          The name of the event type.

        • detectorName — (String)

          The name of the detector.

        • detectorVersion — (String)

          The detector version.

        • iamRoleArn — (String)

          The ARN of the IAM role to use for this job request.

        • arn — (String)

          The ARN of batch prediction job.

        • processedRecordsCount — (Integer)

          The number of records processed by the batch prediction job.

        • totalRecordsCount — (Integer)

          The total number of records in the batch prediction job.

      • nextToken — (String)

        The next token for the subsequent request.

Returns:

  • (AWS.Request)

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

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

Retrieves the status of a DeleteEventsByEventType action.

Examples:

Calling the getDeleteEventsByEventTypeStatus operation

var params = {
  eventTypeName: 'STRING_VALUE' /* required */
};
frauddetector.getDeleteEventsByEventTypeStatus(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: {})
    • eventTypeName — (String)

      Name of event type for which to get the deletion status.

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:

      • eventTypeName — (String)

        The event type name.

      • eventsDeletionStatus — (String)

        The deletion status.

        Possible values include:
        • "IN_PROGRESS_INITIALIZING"
        • "IN_PROGRESS"
        • "CANCEL_IN_PROGRESS"
        • "CANCELED"
        • "COMPLETE"
        • "FAILED"

Returns:

  • (AWS.Request)

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

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

Gets all detectors or a single detector if a detectorId is specified. This is a paginated API. If you provide a null maxResults, this action retrieves a maximum of 10 records per page. If you provide a maxResults, the value must be between 5 and 10. To get the next page results, provide the pagination token from the GetDetectorsResponse as part of your request. A null pagination token fetches the records from the beginning.

Service Reference:

Examples:

Calling the getDetectors operation

var params = {
  detectorId: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
frauddetector.getDetectors(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: {})
    • detectorId — (String)

      The detector ID.

    • nextToken — (String)

      The next token for the subsequent request.

    • maxResults — (Integer)

      The maximum number of objects to return for the request.

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:

      • detectors — (Array<map>)

        The detectors.

        • detectorId — (String)

          The detector ID.

        • description — (String)

          The detector description.

        • eventTypeName — (String)

          The name of the event type.

        • lastUpdatedTime — (String)

          Timestamp of when the detector was last updated.

        • createdTime — (String)

          Timestamp of when the detector was created.

        • arn — (String)

          The detector ARN.

      • nextToken — (String)

        The next page token.

Returns:

  • (AWS.Request)

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

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

Gets a particular detector version.

Service Reference:

Examples:

Calling the getDetectorVersion operation

var params = {
  detectorId: 'STRING_VALUE', /* required */
  detectorVersionId: 'STRING_VALUE' /* required */
};
frauddetector.getDetectorVersion(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: {})
    • detectorId — (String)

      The detector ID.

    • detectorVersionId — (String)

      The detector version ID.

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:

      • detectorId — (String)

        The detector ID.

      • detectorVersionId — (String)

        The detector version ID.

      • description — (String)

        The detector version description.

      • externalModelEndpoints — (Array<String>)

        The Amazon SageMaker model endpoints included in the detector version.

      • modelVersions — (Array<map>)

        The model versions included in the detector version.

        • modelIdrequired — (String)

          The model ID.

        • modelTyperequired — (String)

          The model type.

          Possible values include:
          • "ONLINE_FRAUD_INSIGHTS"
          • "TRANSACTION_FRAUD_INSIGHTS"
        • modelVersionNumberrequired — (String)

          The model version number.

        • arn — (String)

          The model version ARN.

      • rules — (Array<map>)

        The rules included in the detector version.

        • detectorIdrequired — (String)

          The detector for which the rule is associated.

        • ruleIdrequired — (String)

          The rule ID.

        • ruleVersionrequired — (String)

          The rule version.

      • status — (String)

        The status of the detector version.

        Possible values include:
        • "DRAFT"
        • "ACTIVE"
        • "INACTIVE"
      • lastUpdatedTime — (String)

        The timestamp when the detector version was last updated.

      • createdTime — (String)

        The timestamp when the detector version was created.

      • ruleExecutionMode — (String)

        The execution mode of the rule in the dectector

        FIRST_MATCHED indicates that Amazon Fraud Detector evaluates rules sequentially, first to last, stopping at the first matched rule. Amazon Fraud dectector then provides the outcomes for that single rule.

        ALL_MATCHED indicates that Amazon Fraud Detector evaluates all rules and returns the outcomes for all matched rules. You can define and edit the rule mode at the detector version level, when it is in draft status.

        Possible values include:
        • "ALL_MATCHED"
        • "FIRST_MATCHED"
      • arn — (String)

        The detector version ARN.

Returns:

  • (AWS.Request)

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

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

Gets all entity types or a specific entity type if a name is specified. This is a paginated API. If you provide a null maxResults, this action retrieves a maximum of 10 records per page. If you provide a maxResults, the value must be between 5 and 10. To get the next page results, provide the pagination token from the GetEntityTypesResponse as part of your request. A null pagination token fetches the records from the beginning.

Service Reference:

Examples:

Calling the getEntityTypes operation

var params = {
  maxResults: 'NUMBER_VALUE',
  name: 'STRING_VALUE',
  nextToken: 'STRING_VALUE'
};
frauddetector.getEntityTypes(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: {})
    • name — (String)

      The name.

    • nextToken — (String)

      The next token for the subsequent request.

    • maxResults — (Integer)

      The maximum number of objects to return for the request.

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:

      • entityTypes — (Array<map>)

        An array of entity types.

        • name — (String)

          The entity type name.

        • description — (String)

          The entity type description.

        • lastUpdatedTime — (String)

          Timestamp of when the entity type was last updated.

        • createdTime — (String)

          Timestamp of when the entity type was created.

        • arn — (String)

          The entity type ARN.

      • nextToken — (String)

        The next page token.

Returns:

  • (AWS.Request)

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

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

Retrieves details of events stored with Amazon Fraud Detector. This action does not retrieve prediction results.

Service Reference:

Examples:

Calling the getEvent operation

var params = {
  eventId: 'STRING_VALUE', /* required */
  eventTypeName: 'STRING_VALUE' /* required */
};
frauddetector.getEvent(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: {})
    • eventId — (String)

      The ID of the event to retrieve.

    • eventTypeName — (String)

      The event type of the event to retrieve.

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:

      • event — (map)

        The details of the event.

        • eventId — (String)

          The event ID.

        • eventTypeName — (String)

          The event type.

        • eventTimestamp — (String)

          The timestamp that defines when the event under evaluation occurred. The timestamp must be specified using ISO 8601 standard in UTC.

        • eventVariables — (map<String>)

          Names of the event type's variables you defined in Amazon Fraud Detector to represent data elements and their corresponding values for the event you are sending for evaluation.

        • currentLabel — (String)

          The label associated with the event.

        • labelTimestamp — (String)

          The timestamp associated with the label to update. The timestamp must be specified using ISO 8601 standard in UTC.

        • entities — (Array<map>)

          The event entities.

          • entityTyperequired — (String)

            The entity type.

          • entityIdrequired — (String)

            The entity ID. If you do not know the entityId, you can pass unknown, which is areserved string literal.

Returns:

  • (AWS.Request)

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

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

Evaluates an event against a detector version. If a version ID is not provided, the detector’s (ACTIVE) version is used.

Service Reference:

Examples:

Calling the getEventPrediction operation

var params = {
  detectorId: 'STRING_VALUE', /* required */
  entities: [ /* required */
    {
      entityId: 'STRING_VALUE', /* required */
      entityType: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  eventId: 'STRING_VALUE', /* required */
  eventTimestamp: 'STRING_VALUE', /* required */
  eventTypeName: 'STRING_VALUE', /* required */
  eventVariables: { /* required */
    '<variableName>': 'STRING_VALUE',
    /* '<variableName>': ... */
  },
  detectorVersionId: 'STRING_VALUE',
  externalModelEndpointDataBlobs: {
    '<sageMakerEndpointIdentifier>': {
      byteBuffer: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
      contentType: 'STRING_VALUE'
    },
    /* '<sageMakerEndpointIdentifier>': ... */
  }
};
frauddetector.getEventPrediction(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: {})
    • detectorId — (String)

      The detector ID.

    • detectorVersionId — (String)

      The detector version ID.

    • eventId — (String)

      The unique ID used to identify the event.

    • eventTypeName — (String)

      The event type associated with the detector specified for the prediction.

    • entities — (Array<map>)

      The entity type (associated with the detector's event type) and specific entity ID representing who performed the event. If an entity id is not available, use "UNKNOWN."

      • entityTyperequired — (String)

        The entity type.

      • entityIdrequired — (String)

        The entity ID. If you do not know the entityId, you can pass unknown, which is areserved string literal.

    • eventTimestamp — (String)

      Timestamp that defines when the event under evaluation occurred. The timestamp must be specified using ISO 8601 standard in UTC.

    • eventVariables — (map<String>)

      Names of the event type's variables you defined in Amazon Fraud Detector to represent data elements and their corresponding values for the event you are sending for evaluation.

      You must provide at least one eventVariable

      To ensure most accurate fraud prediction and to simplify your data preparation, Amazon Fraud Detector will replace all missing variables or values as follows:

      For Amazon Fraud Detector trained models:

      If a null value is provided explicitly for a variable or if a variable is missing, model will replace the null value or the missing variable (no variable name in the eventVariables map) with calculated default mean/medians for numeric variables and with special values for categorical variables.

      For imported SageMaker models:

      If a null value is provided explicitly for a variable, the model and rules will use “null” as the value. If a variable is not provided (no variable name in the eventVariables map), model and rules will use the default value that is provided for the variable.

    • externalModelEndpointDataBlobs — (map<map>)

      The Amazon SageMaker model endpoint input data blobs.

      • byteBuffer — (Buffer, Typed Array, Blob, String)

        The byte buffer of the Amazon SageMaker model endpoint input data blob.

      • contentType — (String)

        The content type of the Amazon SageMaker model endpoint input data blob.

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:

      • modelScores — (Array<map>)

        The model scores. Amazon Fraud Detector generates model scores between 0 and 1000, where 0 is low fraud risk and 1000 is high fraud risk. Model scores are directly related to the false positive rate (FPR). For example, a score of 600 corresponds to an estimated 10% false positive rate whereas a score of 900 corresponds to an estimated 2% false positive rate.

        • modelVersion — (map)

          The model version.

          • modelIdrequired — (String)

            The model ID.

          • modelTyperequired — (String)

            The model type.

            Possible values include:
            • "ONLINE_FRAUD_INSIGHTS"
            • "TRANSACTION_FRAUD_INSIGHTS"
          • modelVersionNumberrequired — (String)

            The model version number.

          • arn — (String)

            The model version ARN.

        • scores — (map<Float>)

          The model's fraud prediction scores.

      • ruleResults — (Array<map>)

        The results from the rules.

        • ruleId — (String)

          The rule ID that was matched, based on the rule execution mode.

        • outcomes — (Array<String>)

          The outcomes of the matched rule, based on the rule execution mode.

      • externalModelOutputs — (Array<map>)

        The model scores for Amazon SageMaker models.

        • externalModel — (map)

          The Amazon SageMaker model.

          • modelEndpoint — (String)

            The endpoint of the Amazon SageMaker model.

          • modelSource — (String)

            The source of the model.

            Possible values include:
            • "SAGEMAKER"
        • outputs — (map<String>)

          The fraud prediction scores from Amazon SageMaker model.

Returns:

  • (AWS.Request)

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

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

Gets all event types or a specific event type if name is provided. This is a paginated API. If you provide a null maxResults, this action retrieves a maximum of 10 records per page. If you provide a maxResults, the value must be between 5 and 10. To get the next page results, provide the pagination token from the GetEventTypesResponse as part of your request. A null pagination token fetches the records from the beginning.

Service Reference:

Examples:

Calling the getEventTypes operation

var params = {
  maxResults: 'NUMBER_VALUE',
  name: 'STRING_VALUE',
  nextToken: 'STRING_VALUE'
};
frauddetector.getEventTypes(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: {})
    • name — (String)

      The name.

    • nextToken — (String)

      The next token for the subsequent request.

    • maxResults — (Integer)

      The maximum number of objects to return for the request.

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:

      • eventTypes — (Array<map>)

        An array of event types.

        • name — (String)

          The event type name.

        • description — (String)

          The event type description.

        • eventVariables — (Array<String>)

          The event type event variables.

        • labels — (Array<String>)

          The event type labels.

        • entityTypes — (Array<String>)

          The event type entity types.

        • eventIngestion — (String)

          If Enabled, Amazon Fraud Detector stores event data when you generate a prediction and uses that data to update calculated variables in near real-time. Amazon Fraud Detector uses this data, known as INGESTED_EVENTS, to train your model and improve fraud predictions.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
        • ingestedEventStatistics — (map)

          Data about the stored events.

          • numberOfEvents — (Integer)

            The number of stored events.

          • eventDataSizeInBytes — (Integer)

            The total size of the stored events.

          • leastRecentEvent — (String)

            The oldest stored event.

          • mostRecentEvent — (String)

            The newest stored event.

          • lastUpdatedTime — (String)

            Timestamp of when the stored event was last updated.

        • lastUpdatedTime — (String)

          Timestamp of when the event type was last updated.

        • createdTime — (String)

          Timestamp of when the event type was created.

        • arn — (String)

          The entity type ARN.

      • nextToken — (String)

        The next page token.

Returns:

  • (AWS.Request)

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

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

Gets the details for one or more Amazon SageMaker models that have been imported into the service. This is a paginated API. If you provide a null maxResults, this actions retrieves a maximum of 10 records per page. If you provide a maxResults, the value must be between 5 and 10. To get the next page results, provide the pagination token from the GetExternalModelsResult as part of your request. A null pagination token fetches the records from the beginning.

Service Reference:

Examples:

Calling the getExternalModels operation

var params = {
  maxResults: 'NUMBER_VALUE',
  modelEndpoint: 'STRING_VALUE',
  nextToken: 'STRING_VALUE'
};
frauddetector.getExternalModels(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: {})
    • modelEndpoint — (String)

      The Amazon SageMaker model endpoint.

    • nextToken — (String)

      The next page token for the request.

    • maxResults — (Integer)

      The maximum number of objects to return for the request.

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:

      • externalModels — (Array<map>)

        Gets the Amazon SageMaker models.

        • modelEndpoint — (String)

          The Amazon SageMaker model endpoints.

        • modelSource — (String)

          The source of the model.

          Possible values include:
          • "SAGEMAKER"
        • invokeModelEndpointRoleArn — (String)

          The role used to invoke the model.

        • inputConfiguration — (map)

          The input configuration.

          • eventTypeName — (String)

            The event type name.

          • format — (String)

            The format of the model input configuration. The format differs depending on if it is passed through to SageMaker or constructed by Amazon Fraud Detector.

            Possible values include:
            • "TEXT_CSV"
            • "APPLICATION_JSON"
          • useEventVariablesrequired — (Boolean)

            The event variables.

          • jsonInputTemplate — (String)

            Template for constructing the JSON input-data sent to SageMaker. At event-evaluation, the placeholders for variable names in the template will be replaced with the variable values before being sent to SageMaker.

          • csvInputTemplate — (String)

            Template for constructing the CSV input-data sent to SageMaker. At event-evaluation, the placeholders for variable-names in the template will be replaced with the variable values before being sent to SageMaker.

        • outputConfiguration — (map)

          The output configuration.

          • formatrequired — (String)

            The format of the model output configuration.

            Possible values include:
            • "TEXT_CSV"
            • "APPLICATION_JSONLINES"
          • jsonKeyToVariableMap — (map<String>)

            A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.

          • csvIndexToVariableMap — (map<String>)

            A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.

        • modelEndpointStatus — (String)

          The Amazon Fraud Detector status for the external model endpoint

          Possible values include:
          • "ASSOCIATED"
          • "DISSOCIATED"
        • lastUpdatedTime — (String)

          Timestamp of when the model was last updated.

        • createdTime — (String)

          Timestamp of when the model was last created.

        • arn — (String)

          The model ARN.

      • nextToken — (String)

        The next page token to be used in subsequent requests.

Returns:

  • (AWS.Request)

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

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

Gets the encryption key if a KMS key has been specified to be used to encrypt content in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the getKMSEncryptionKey operation

frauddetector.getKMSEncryptionKey(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. The data object has the following properties:

      • kmsKey — (map)

        The KMS encryption key.

        • kmsEncryptionKeyArn — (String)

          The encryption key ARN.

Returns:

  • (AWS.Request)

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

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

Gets all labels or a specific label if name is provided. This is a paginated API. If you provide a null maxResults, this action retrieves a maximum of 50 records per page. If you provide a maxResults, the value must be between 10 and 50. To get the next page results, provide the pagination token from the GetGetLabelsResponse as part of your request. A null pagination token fetches the records from the beginning.

Service Reference:

Examples:

Calling the getLabels operation

var params = {
  maxResults: 'NUMBER_VALUE',
  name: 'STRING_VALUE',
  nextToken: 'STRING_VALUE'
};
frauddetector.getLabels(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: {})
    • name — (String)

      The name of the label or labels to get.

    • nextToken — (String)

      The next token for the subsequent request.

    • maxResults — (Integer)

      The maximum number of objects to return for the request.

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:

      • labels — (Array<map>)

        An array of labels.

        • name — (String)

          The label name.

        • description — (String)

          The label description.

        • lastUpdatedTime — (String)

          Timestamp of when the label was last updated.

        • createdTime — (String)

          Timestamp of when the event type was created.

        • arn — (String)

          The label ARN.

      • nextToken — (String)

        The next page token.

Returns:

  • (AWS.Request)

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

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

Gets one or more models. Gets all models for the Amazon Web Services account if no model type and no model id provided. Gets all models for the Amazon Web Services account and model type, if the model type is specified but model id is not provided. Gets a specific model if (model type, model id) tuple is specified.

This is a paginated API. If you provide a null maxResults, this action retrieves a maximum of 10 records per page. If you provide a maxResults, the value must be between 1 and 10. To get the next page results, provide the pagination token from the response as part of your request. A null pagination token fetches the records from the beginning.

Service Reference:

Examples:

Calling the getModels operation

var params = {
  maxResults: 'NUMBER_VALUE',
  modelId: 'STRING_VALUE',
  modelType: ONLINE_FRAUD_INSIGHTS | TRANSACTION_FRAUD_INSIGHTS,
  nextToken: 'STRING_VALUE'
};
frauddetector.getModels(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: {})
    • modelId — (String)

      The model ID.

    • modelType — (String)

      The model type.

      Possible values include:
      • "ONLINE_FRAUD_INSIGHTS"
      • "TRANSACTION_FRAUD_INSIGHTS"
    • nextToken — (String)

      The next token for the subsequent request.

    • maxResults — (Integer)

      The maximum number of objects to return for the request.

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:

      • nextToken — (String)

        The next page token to be used in subsequent requests.

      • models — (Array<map>)

        The array of models.

        • modelId — (String)

          The model ID.

        • modelType — (String)

          The model type.

          Possible values include:
          • "ONLINE_FRAUD_INSIGHTS"
          • "TRANSACTION_FRAUD_INSIGHTS"
        • description — (String)

          The model description.

        • eventTypeName — (String)

          The name of the event type.

        • createdTime — (String)

          Timestamp of when the model was created.

        • lastUpdatedTime — (String)

          Timestamp of last time the model was updated.

        • arn — (String)

          The ARN of the model.

Returns:

  • (AWS.Request)

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

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

Gets the details of the specified model version.

Service Reference:

Examples:

Calling the getModelVersion operation

var params = {
  modelId: 'STRING_VALUE', /* required */
  modelType: ONLINE_FRAUD_INSIGHTS | TRANSACTION_FRAUD_INSIGHTS, /* required */
  modelVersionNumber: 'STRING_VALUE' /* required */
};
frauddetector.getModelVersion(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: {})
    • modelId — (String)

      The model ID.

    • modelType — (String)

      The model type.

      Possible values include:
      • "ONLINE_FRAUD_INSIGHTS"
      • "TRANSACTION_FRAUD_INSIGHTS"
    • modelVersionNumber — (String)

      The model version number.

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:

      • modelId — (String)

        The model ID.

      • modelType — (String)

        The model type.

        Possible values include:
        • "ONLINE_FRAUD_INSIGHTS"
        • "TRANSACTION_FRAUD_INSIGHTS"
      • modelVersionNumber — (String)

        The model version number.

      • trainingDataSource — (String)

        The training data source.

        Possible values include:
        • "EXTERNAL_EVENTS"
        • "INGESTED_EVENTS"
      • trainingDataSchema — (map)

        The training data schema.

        • modelVariablesrequired — (Array<String>)

          The training data schema variables.

        • labelSchemarequired — (map)

          The label schema.

          • labelMapperrequired — (map<Array<String>>)

            The label mapper maps the Amazon Fraud Detector supported model classification labels (FRAUD, LEGIT) to the appropriate event type labels. For example, if "FRAUD" and "LEGIT" are Amazon Fraud Detector supported labels, this mapper could be: {"FRAUD" => ["0"], "LEGIT" => ["1"]} or {"FRAUD" => ["false"], "LEGIT" => ["true"]} or {"FRAUD" => ["fraud", "abuse"], "LEGIT" => ["legit", "safe"]}. The value part of the mapper is a list, because you may have multiple label variants from your event type for a single Amazon Fraud Detector label.

          • unlabeledEventsTreatment — (String)

            The action to take for unlabeled events.

            Possible values include:
            • "IGNORE"
            • "FRAUD"
            • "LEGIT"
      • externalEventsDetail — (map)

        The details of the external events data used for training the model version. This will be populated if the trainingDataSource is EXTERNAL_EVENTS

        • dataLocationrequired — (String)

          The Amazon S3 bucket location for the data.

        • dataAccessRoleArnrequired — (String)

          The ARN of the role that provides Amazon Fraud Detector access to the data location.

      • ingestedEventsDetail — (map)

        The details of the ingested events data used for training the model version. This will be populated if the trainingDataSource is INGESTED_EVENTS.

        • ingestedEventsTimeWindowrequired — (map)

          The start and stop time of the ingested events.

          • startTimerequired — (String)

            Timestamp of the first ingensted event.

          • endTimerequired — (String)

            Timestamp of the final ingested event.

      • status — (String)

        The model version status.

        Possible values are:

        • TRAINING_IN_PROGRESS

        • TRAINING_COMPLETE

        • ACTIVATE_REQUESTED

        • ACTIVATE_IN_PROGRESS

        • ACTIVE

        • INACTIVATE_REQUESTED

        • INACTIVATE_IN_PROGRESS

        • INACTIVE

        • ERROR

      • arn — (String)

        The model version ARN.

Returns:

  • (AWS.Request)

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

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

Gets one or more outcomes. This is a paginated API. If you provide a null maxResults, this actions retrieves a maximum of 100 records per page. If you provide a maxResults, the value must be between 50 and 100. To get the next page results, provide the pagination token from the GetOutcomesResult as part of your request. A null pagination token fetches the records from the beginning.

Service Reference:

Examples:

Calling the getOutcomes operation

var params = {
  maxResults: 'NUMBER_VALUE',
  name: 'STRING_VALUE',
  nextToken: 'STRING_VALUE'
};
frauddetector.getOutcomes(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: {})
    • name — (String)

      The name of the outcome or outcomes to get.

    • nextToken — (String)

      The next page token for the request.

    • maxResults — (Integer)

      The maximum number of objects to return for the request.

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:

      • outcomes — (Array<map>)

        The outcomes.

        • name — (String)

          The outcome name.

        • description — (String)

          The outcome description.

        • lastUpdatedTime — (String)

          The timestamp when the outcome was last updated.

        • createdTime — (String)

          The timestamp when the outcome was created.

        • arn — (String)

          The outcome ARN.

      • nextToken — (String)

        The next page token for subsequent requests.

Returns:

  • (AWS.Request)

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

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

Get all rules for a detector (paginated) if ruleId and ruleVersion are not specified. Gets all rules for the detector and the ruleId if present (paginated). Gets a specific rule if both the ruleId and the ruleVersion are specified.

This is a paginated API. Providing null maxResults results in retrieving maximum of 100 records per page. If you provide maxResults the value must be between 50 and 100. To get the next page result, a provide a pagination token from GetRulesResult as part of your request. Null pagination token fetches the records from the beginning.

Service Reference:

Examples:

Calling the getRules operation

var params = {
  detectorId: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  ruleId: 'STRING_VALUE',
  ruleVersion: 'STRING_VALUE'
};
frauddetector.getRules(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: {})
    • ruleId — (String)

      The rule ID.

    • detectorId — (String)

      The detector ID.

    • ruleVersion — (String)

      The rule version.

    • nextToken — (String)

      The next page token.

    • maxResults — (Integer)

      The maximum number of rules to return for the request.

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:

      • ruleDetails — (Array<map>)

        The details of the requested rule.

        • ruleId — (String)

          The rule ID.

        • description — (String)

          The rule description.

        • detectorId — (String)

          The detector for which the rule is associated.

        • ruleVersion — (String)

          The rule version.

        • expression — (String)

          The rule expression.

        • language — (String)

          The rule language.

          Possible values include:
          • "DETECTORPL"
        • outcomes — (Array<String>)

          The rule outcomes.

        • lastUpdatedTime — (String)

          Timestamp of the last time the rule was updated.

        • createdTime — (String)

          The timestamp of when the rule was created.

        • arn — (String)

          The rule ARN.

      • nextToken — (String)

        The next page token to be used in subsequent requests.

Returns:

  • (AWS.Request)

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

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

Gets all of the variables or the specific variable. This is a paginated API. Providing null maxSizePerPage results in retrieving maximum of 100 records per page. If you provide maxSizePerPage the value must be between 50 and 100. To get the next page result, a provide a pagination token from GetVariablesResult as part of your request. Null pagination token fetches the records from the beginning.

Service Reference:

Examples:

Calling the getVariables operation

var params = {
  maxResults: 'NUMBER_VALUE',
  name: 'STRING_VALUE',
  nextToken: 'STRING_VALUE'
};
frauddetector.getVariables(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: {})
    • name — (String)

      The name of the variable.

    • nextToken — (String)

      The next page token of the get variable request.

    • maxResults — (Integer)

      The max size per page determined for the get variable request.

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:

      • variables — (Array<map>)

        The names of the variables returned.

        • name — (String)

          The name of the variable.

        • dataType — (String)

          The data type of the variable. For more information see Variable types.

          Possible values include:
          • "STRING"
          • "INTEGER"
          • "FLOAT"
          • "BOOLEAN"
        • dataSource — (String)

          The data source of the variable.

          Possible values include:
          • "EVENT"
          • "MODEL_SCORE"
          • "EXTERNAL_MODEL_SCORE"
        • defaultValue — (String)

          The default value of the variable.

        • description — (String)

          The description of the variable.

        • variableType — (String)

          The variable type of the variable.

          Valid Values: AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT

        • lastUpdatedTime — (String)

          The time when variable was last updated.

        • createdTime — (String)

          The time when the variable was created.

        • arn — (String)

          The ARN of the variable.

      • nextToken — (String)

        The next page token to be used in subsequent requests.

Returns:

  • (AWS.Request)

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

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

Lists all tags associated with the resource. This is a paginated API. To get the next page results, provide the pagination token from the response as part of your request. A null pagination token fetches the records from the beginning.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceARN: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
frauddetector.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 that specifies the resource whose tags you want to list.

    • nextToken — (String)

      The next token from the previous results.

    • maxResults — (Integer)

      The maximum number of objects to return for the request.

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 — (Array<map>)

        A collection of key and value pairs.

        • keyrequired — (String)

          A tag key.

        • valuerequired — (String)

          A value assigned to a tag key.

      • nextToken — (String)

        The next token for subsequent requests.

Returns:

  • (AWS.Request)

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

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

Creates or updates a detector.

Service Reference:

Examples:

Calling the putDetector operation

var params = {
  detectorId: 'STRING_VALUE', /* required */
  eventTypeName: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.putDetector(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: {})
    • detectorId — (String)

      The detector ID.

    • description — (String)

      The description of the detector.

    • eventTypeName — (String)

      The name of the event type.

    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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.

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

Creates or updates an entity type. An entity represents who is performing the event. As part of a fraud prediction, you pass the entity ID to indicate the specific entity who performed the event. An entity type classifies the entity. Example classifications include customer, merchant, or account.

Service Reference:

Examples:

Calling the putEntityType operation

var params = {
  name: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.putEntityType(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: {})
    • name — (String)

      The name of the entity type.

    • description — (String)

      The description.

    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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.

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

Creates or updates an event type. An event is a business activity that is evaluated for fraud risk. With Amazon Fraud Detector, you generate fraud predictions for events. An event type defines the structure for an event sent to Amazon Fraud Detector. This includes the variables sent as part of the event, the entity performing the event (such as a customer), and the labels that classify the event. Example event types include online payment transactions, account registrations, and authentications.

Service Reference:

Examples:

Calling the putEventType operation

var params = {
  entityTypes: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  eventVariables: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  name: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  eventIngestion: ENABLED | DISABLED,
  labels: [
    'STRING_VALUE',
    /* more items */
  ],
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.putEventType(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: {})
    • name — (String)

      The name.

    • description — (String)

      The description of the event type.

    • eventVariables — (Array<String>)

      The event type variables.

    • labels — (Array<String>)

      The event type labels.

    • entityTypes — (Array<String>)

      The entity type for the event type. Example entity types: customer, merchant, account.

    • eventIngestion — (String)

      Specifies if ingenstion is enabled or disabled.

      Possible values include:
      • "ENABLED"
      • "DISABLED"
    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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.

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

Creates or updates an Amazon SageMaker model endpoint. You can also use this action to update the configuration of the model endpoint, including the IAM role and/or the mapped variables.

Service Reference:

Examples:

Calling the putExternalModel operation

var params = {
  inputConfiguration: { /* required */
    useEventVariables: true || false, /* required */
    csvInputTemplate: 'STRING_VALUE',
    eventTypeName: 'STRING_VALUE',
    format: TEXT_CSV | APPLICATION_JSON,
    jsonInputTemplate: 'STRING_VALUE'
  },
  invokeModelEndpointRoleArn: 'STRING_VALUE', /* required */
  modelEndpoint: 'STRING_VALUE', /* required */
  modelEndpointStatus: ASSOCIATED | DISSOCIATED, /* required */
  modelSource: SAGEMAKER, /* required */
  outputConfiguration: { /* required */
    format: TEXT_CSV | APPLICATION_JSONLINES, /* required */
    csvIndexToVariableMap: {
      '<string>': 'STRING_VALUE',
      /* '<string>': ... */
    },
    jsonKeyToVariableMap: {
      '<string>': 'STRING_VALUE',
      /* '<string>': ... */
    }
  },
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.putExternalModel(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: {})
    • modelEndpoint — (String)

      The model endpoints name.

    • modelSource — (String)

      The source of the model.

      Possible values include:
      • "SAGEMAKER"
    • invokeModelEndpointRoleArn — (String)

      The IAM role used to invoke the model endpoint.

    • inputConfiguration — (map)

      The model endpoint input configuration.

      • eventTypeName — (String)

        The event type name.

      • format — (String)

        The format of the model input configuration. The format differs depending on if it is passed through to SageMaker or constructed by Amazon Fraud Detector.

        Possible values include:
        • "TEXT_CSV"
        • "APPLICATION_JSON"
      • useEventVariablesrequired — (Boolean)

        The event variables.

      • jsonInputTemplate — (String)

        Template for constructing the JSON input-data sent to SageMaker. At event-evaluation, the placeholders for variable names in the template will be replaced with the variable values before being sent to SageMaker.

      • csvInputTemplate — (String)

        Template for constructing the CSV input-data sent to SageMaker. At event-evaluation, the placeholders for variable-names in the template will be replaced with the variable values before being sent to SageMaker.

    • outputConfiguration — (map)

      The model endpoint output configuration.

      • formatrequired — (String)

        The format of the model output configuration.

        Possible values include:
        • "TEXT_CSV"
        • "APPLICATION_JSONLINES"
      • jsonKeyToVariableMap — (map<String>)

        A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.

      • csvIndexToVariableMap — (map<String>)

        A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.

    • modelEndpointStatus — (String)

      The model endpoint’s status in Amazon Fraud Detector.

      Possible values include:
      • "ASSOCIATED"
      • "DISSOCIATED"
    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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.

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

Specifies the KMS key to be used to encrypt content in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the putKMSEncryptionKey operation

var params = {
  kmsEncryptionKeyArn: 'STRING_VALUE' /* required */
};
frauddetector.putKMSEncryptionKey(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: {})
    • kmsEncryptionKeyArn — (String)

      The KMS encryption key ARN.

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.

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

Creates or updates label. A label classifies an event as fraudulent or legitimate. Labels are associated with event types and used to train supervised machine learning models in Amazon Fraud Detector.

Service Reference:

Examples:

Calling the putLabel operation

var params = {
  name: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.putLabel(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: {})
    • name — (String)

      The label name.

    • description — (String)

      The label description.

    • tags — (Array<map>)

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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.

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

Creates or updates an outcome.

Service Reference:

Examples:

Calling the putOutcome operation

var params = {
  name: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.putOutcome(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: {})
    • name — (String)

      The name of the outcome.

    • description — (String)

      The outcome description.

    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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.

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

Stores events in Amazon Fraud Detector without generating fraud predictions for those events. For example, you can use SendEvent to upload a historical dataset, which you can then later use to train a model.

Service Reference:

Examples:

Calling the sendEvent operation

var params = {
  entities: [ /* required */
    {
      entityId: 'STRING_VALUE', /* required */
      entityType: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  eventId: 'STRING_VALUE', /* required */
  eventTimestamp: 'STRING_VALUE', /* required */
  eventTypeName: 'STRING_VALUE', /* required */
  eventVariables: { /* required */
    '<variableName>': 'STRING_VALUE',
    /* '<variableName>': ... */
  },
  assignedLabel: 'STRING_VALUE',
  labelTimestamp: 'STRING_VALUE'
};
frauddetector.sendEvent(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: {})
    • eventId — (String)

      The event ID to upload.

    • eventTypeName — (String)

      The event type name of the event.

    • eventTimestamp — (String)

      The timestamp that defines when the event under evaluation occurred. The timestamp must be specified using ISO 8601 standard in UTC.

    • eventVariables — (map<String>)

      Names of the event type's variables you defined in Amazon Fraud Detector to represent data elements and their corresponding values for the event you are sending for evaluation.

    • assignedLabel — (String)

      The label to associate with the event. Required if specifying labelTimestamp.

    • labelTimestamp — (String)

      The timestamp associated with the label. Required if specifying assignedLabel.

    • entities — (Array<map>)

      An array of entities.

      • entityTyperequired — (String)

        The entity type.

      • entityIdrequired — (String)

        The entity ID. If you do not know the entityId, you can pass unknown, which is areserved string literal.

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

Assigns tags to a resource.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceARN: 'STRING_VALUE', /* required */
  tags: [ /* required */
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.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 resource ARN.

    • tags — (Array<map>)

      The tags to assign to the resource.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceARN: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
frauddetector.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 resource from which to remove the tag.

    • tagKeys — (Array<String>)

      The resource ARN.

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.

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

Updates a detector version. The detector version attributes that you can update include models, external model endpoints, rules, rule execution mode, and description. You can only update a DRAFT detector version.

Service Reference:

Examples:

Calling the updateDetectorVersion operation

var params = {
  detectorId: 'STRING_VALUE', /* required */
  detectorVersionId: 'STRING_VALUE', /* required */
  externalModelEndpoints: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  rules: [ /* required */
    {
      detectorId: 'STRING_VALUE', /* required */
      ruleId: 'STRING_VALUE', /* required */
      ruleVersion: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  description: 'STRING_VALUE',
  modelVersions: [
    {
      modelId: 'STRING_VALUE', /* required */
      modelType: ONLINE_FRAUD_INSIGHTS | TRANSACTION_FRAUD_INSIGHTS, /* required */
      modelVersionNumber: 'STRING_VALUE', /* required */
      arn: 'STRING_VALUE'
    },
    /* more items */
  ],
  ruleExecutionMode: ALL_MATCHED | FIRST_MATCHED
};
frauddetector.updateDetectorVersion(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: {})
    • detectorId — (String)

      The parent detector ID for the detector version you want to update.

    • detectorVersionId — (String)

      The detector version ID.

    • externalModelEndpoints — (Array<String>)

      The Amazon SageMaker model endpoints to include in the detector version.

    • rules — (Array<map>)

      The rules to include in the detector version.

      • detectorIdrequired — (String)

        The detector for which the rule is associated.

      • ruleIdrequired — (String)

        The rule ID.

      • ruleVersionrequired — (String)

        The rule version.

    • description — (String)

      The detector version description.

    • modelVersions — (Array<map>)

      The model versions to include in the detector version.

      • modelIdrequired — (String)

        The model ID.

      • modelTyperequired — (String)

        The model type.

        Possible values include:
        • "ONLINE_FRAUD_INSIGHTS"
        • "TRANSACTION_FRAUD_INSIGHTS"
      • modelVersionNumberrequired — (String)

        The model version number.

      • arn — (String)

        The model version ARN.

    • ruleExecutionMode — (String)

      The rule execution mode to add to the detector.

      If you specify FIRST_MATCHED, Amazon Fraud Detector evaluates rules sequentially, first to last, stopping at the first matched rule. Amazon Fraud dectector then provides the outcomes for that single rule.

      If you specifiy ALL_MATCHED, Amazon Fraud Detector evaluates all rules and returns the outcomes for all matched rules. You can define and edit the rule mode at the detector version level, when it is in draft status.

      The default behavior is FIRST_MATCHED.

      Possible values include:
      • "ALL_MATCHED"
      • "FIRST_MATCHED"

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.

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

Updates the detector version's description. You can update the metadata for any detector version (DRAFT, ACTIVE, or INACTIVE).

Service Reference:

Examples:

Calling the updateDetectorVersionMetadata operation

var params = {
  description: 'STRING_VALUE', /* required */
  detectorId: 'STRING_VALUE', /* required */
  detectorVersionId: 'STRING_VALUE' /* required */
};
frauddetector.updateDetectorVersionMetadata(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: {})
    • detectorId — (String)

      The detector ID.

    • detectorVersionId — (String)

      The detector version ID.

    • description — (String)

      The description.

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.

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

Updates the detector version’s status. You can perform the following promotions or demotions using UpdateDetectorVersionStatus: DRAFT to ACTIVE, ACTIVE to INACTIVE, and INACTIVE to ACTIVE.

Service Reference:

Examples:

Calling the updateDetectorVersionStatus operation

var params = {
  detectorId: 'STRING_VALUE', /* required */
  detectorVersionId: 'STRING_VALUE', /* required */
  status: DRAFT | ACTIVE | INACTIVE /* required */
};
frauddetector.updateDetectorVersionStatus(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: {})
    • detectorId — (String)

      The detector ID.

    • detectorVersionId — (String)

      The detector version ID.

    • status — (String)

      The new status.

      Possible values include:
      • "DRAFT"
      • "ACTIVE"
      • "INACTIVE"

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.

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

Updates the specified event with a new label.

Service Reference:

Examples:

Calling the updateEventLabel operation

var params = {
  assignedLabel: 'STRING_VALUE', /* required */
  eventId: 'STRING_VALUE', /* required */
  eventTypeName: 'STRING_VALUE', /* required */
  labelTimestamp: 'STRING_VALUE' /* required */
};
frauddetector.updateEventLabel(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: {})
    • eventId — (String)

      The ID of the event associated with the label to update.

    • eventTypeName — (String)

      The event type of the event associated with the label to update.

    • assignedLabel — (String)

      The new label to assign to the event.

    • labelTimestamp — (String)

      The timestamp associated with the label. The timestamp must be specified using ISO 8601 standard in UTC.

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.

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

Updates model description.

Service Reference:

Examples:

Calling the updateModel operation

var params = {
  modelId: 'STRING_VALUE', /* required */
  modelType: ONLINE_FRAUD_INSIGHTS | TRANSACTION_FRAUD_INSIGHTS, /* required */
  description: 'STRING_VALUE'
};
frauddetector.updateModel(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: {})
    • modelId — (String)

      The model ID.

    • modelType — (String)

      The model type.

      Possible values include:
      • "ONLINE_FRAUD_INSIGHTS"
      • "TRANSACTION_FRAUD_INSIGHTS"
    • description — (String)

      The new model description.

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.

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

Updates a model version. Updating a model version retrains an existing model version using updated training data and produces a new minor version of the model. You can update the training data set location and data access role attributes using this action. This action creates and trains a new minor version of the model, for example version 1.01, 1.02, 1.03.

Service Reference:

Examples:

Calling the updateModelVersion operation

var params = {
  majorVersionNumber: 'STRING_VALUE', /* required */
  modelId: 'STRING_VALUE', /* required */
  modelType: ONLINE_FRAUD_INSIGHTS | TRANSACTION_FRAUD_INSIGHTS, /* required */
  externalEventsDetail: {
    dataAccessRoleArn: 'STRING_VALUE', /* required */
    dataLocation: 'STRING_VALUE' /* required */
  },
  ingestedEventsDetail: {
    ingestedEventsTimeWindow: { /* required */
      endTime: 'STRING_VALUE', /* required */
      startTime: 'STRING_VALUE' /* required */
    }
  },
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.updateModelVersion(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: {})
    • modelId — (String)

      The model ID.

    • modelType — (String)

      The model type.

      Possible values include:
      • "ONLINE_FRAUD_INSIGHTS"
      • "TRANSACTION_FRAUD_INSIGHTS"
    • majorVersionNumber — (String)

      The major version number.

    • externalEventsDetail — (map)

      The details of the external events data used for training the model version. Required if trainingDataSource is EXTERNAL_EVENTS.

      • dataLocationrequired — (String)

        The Amazon S3 bucket location for the data.

      • dataAccessRoleArnrequired — (String)

        The ARN of the role that provides Amazon Fraud Detector access to the data location.

    • ingestedEventsDetail — (map)

      The details of the ingested event used for training the model version. Required if your trainingDataSource is INGESTED_EVENTS.

      • ingestedEventsTimeWindowrequired — (map)

        The start and stop time of the ingested events.

        • startTimerequired — (String)

          Timestamp of the first ingensted event.

        • endTimerequired — (String)

          Timestamp of the final ingested event.

    • tags — (Array<map>)

      A collection of key and value pairs.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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:

      • modelId — (String)

        The model ID.

      • modelType — (String)

        The model type.

        Possible values include:
        • "ONLINE_FRAUD_INSIGHTS"
        • "TRANSACTION_FRAUD_INSIGHTS"
      • modelVersionNumber — (String)

        The model version number of the model version updated.

      • status — (String)

        The status of the updated model version.

Returns:

  • (AWS.Request)

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

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

Updates the status of a model version.

You can perform the following status updates:

  1. Change the TRAINING_COMPLETE status to ACTIVE.

  2. Change ACTIVE to INACTIVE.

Service Reference:

Examples:

Calling the updateModelVersionStatus operation

var params = {
  modelId: 'STRING_VALUE', /* required */
  modelType: ONLINE_FRAUD_INSIGHTS | TRANSACTION_FRAUD_INSIGHTS, /* required */
  modelVersionNumber: 'STRING_VALUE', /* required */
  status: ACTIVE | INACTIVE | TRAINING_CANCELLED /* required */
};
frauddetector.updateModelVersionStatus(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: {})
    • modelId — (String)

      The model ID of the model version to update.

    • modelType — (String)

      The model type.

      Possible values include:
      • "ONLINE_FRAUD_INSIGHTS"
      • "TRANSACTION_FRAUD_INSIGHTS"
    • modelVersionNumber — (String)

      The model version number.

    • status — (String)

      The model version status.

      Possible values include:
      • "ACTIVE"
      • "INACTIVE"
      • "TRAINING_CANCELLED"

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.

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

Updates a rule's metadata. The description attribute can be updated.

Service Reference:

Examples:

Calling the updateRuleMetadata operation

var params = {
  description: 'STRING_VALUE', /* required */
  rule: { /* required */
    detectorId: 'STRING_VALUE', /* required */
    ruleId: 'STRING_VALUE', /* required */
    ruleVersion: 'STRING_VALUE' /* required */
  }
};
frauddetector.updateRuleMetadata(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: {})
    • rule — (map)

      The rule to update.

      • detectorIdrequired — (String)

        The detector for which the rule is associated.

      • ruleIdrequired — (String)

        The rule ID.

      • ruleVersionrequired — (String)

        The rule version.

    • description — (String)

      The rule description.

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.

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

Updates a rule version resulting in a new rule version. Updates a rule version resulting in a new rule version (version 1, 2, 3 ...).

Service Reference:

Examples:

Calling the updateRuleVersion operation

var params = {
  expression: 'STRING_VALUE', /* required */
  language: DETECTORPL, /* required */
  outcomes: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  rule: { /* required */
    detectorId: 'STRING_VALUE', /* required */
    ruleId: 'STRING_VALUE', /* required */
    ruleVersion: 'STRING_VALUE' /* required */
  },
  description: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
frauddetector.updateRuleVersion(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: {})
    • rule — (map)

      The rule to update.

      • detectorIdrequired — (String)

        The detector for which the rule is associated.

      • ruleIdrequired — (String)

        The rule ID.

      • ruleVersionrequired — (String)

        The rule version.

    • description — (String)

      The description.

    • expression — (String)

      The rule expression.

    • language — (String)

      The language.

      Possible values include:
      • "DETECTORPL"
    • outcomes — (Array<String>)

      The outcomes.

    • tags — (Array<map>)

      The tags to assign to the rule version.

      • keyrequired — (String)

        A tag key.

      • valuerequired — (String)

        A value assigned to a tag key.

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:

      • rule — (map)

        The new rule version that was created.

        • detectorIdrequired — (String)

          The detector for which the rule is associated.

        • ruleIdrequired — (String)

          The rule ID.

        • ruleVersionrequired — (String)

          The rule version.

Returns:

  • (AWS.Request)

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

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

Updates a variable.

Service Reference:

Examples:

Calling the updateVariable operation

var params = {
  name: 'STRING_VALUE', /* required */
  defaultValue: 'STRING_VALUE',
  description: 'STRING_VALUE',
  variableType: 'STRING_VALUE'
};
frauddetector.updateVariable(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: {})
    • name — (String)

      The name of the variable.

    • defaultValue — (String)

      The new default value of the variable.

    • description — (String)

      The new description.

    • variableType — (String)

      The variable type. For more information see Variable types.

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.