AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

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)

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

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

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • 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 */
  ]
};
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 entry.

      • dataType — (String)

        The data type of the variable entry.

      • dataSource — (String)

        The data source of the variable entry.

      • defaultValue — (String)

        The default value of the variable entry.

      • description — (String)

        The description of the variable entry.

      • variableType — (String)

        The type of the variable entry.

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.

          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.

        • lastUpdatedTime — (String)

          The time when variable was last updated.

        • createdTime — (String)

          The time when the variable was created.

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

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, /* required */
      modelVersionNumber: '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 parent model ID.

      • modelTyperequired — (String)

        The model type.

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

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

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

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

Service Reference:

Examples:

Calling the createModelVersion operation

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

      The model version 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. The data object has the following properties:

      • modelId — (String)

        The model ID.

      • modelType — (String)

        The model type.

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

        The version of the model.

      • 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'
};
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.

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

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.

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.

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

Deletes the specified event.

Service Reference:

Examples:

Calling the deleteEvent operation

var params = {
  eventId: 'STRING_VALUE' /* required */
};
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.

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.

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

    • modelType — (String)

      The model type.

      Possible values include:
      • "ONLINE_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"
        • modelVersionNumber — (String)

          The model version.

        • description — (String)

          The model description.

        • status — (String)

          The model status.

        • trainingDataSource — (map)

          The model training data source.

          • dataLocationrequired — (String)

            The data location of the training data source.

          • dataAccessRoleArnrequired — (String)

            The data access role ARN for the training data source.

        • modelVariables — (Array<map>)

          The model variables.

          • namerequired — (String)

            The model variable's name.>

          • index — (Integer)

            The model variable's index.>

        • labelSchema — (map)

          The model label schema.

          • labelKeyrequired — (String)

            The label key.

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

            The label mapper maps the Amazon Fraud Detector supported label to the appropriate source 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 variants for a single Amazon Fraud Detector label.

        • validationMetrics — (map<String>)

          The model validation metrics.

        • trainingMetrics — (map<String>)

          The model training metrics.

        • lastUpdatedTime — (String)

          The timestamp when the model was last updated.

        • createdTime — (String)

          The timestamp when the model was created.

      • nextToken — (String)

        The next token.

Returns:

  • (AWS.Request)

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

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

Gets all of detectors. This is a paginated API. If you provide a null maxSizePerPage, this actions retrieves a maximum of 10 records per page. If you provide a maxSizePerPage, 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 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.

        • lastUpdatedTime — (String)

          Timestamp of when the detector was last updated.

        • createdTime — (String)

          Timestamp of when the detector was created.

      • 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 parent model ID.

        • modelTyperequired — (String)

          The model type.

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

          The model version.

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

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 maxSizePerPage, this actions retrieves a maximum of 10 records per page. If you provide a maxSizePerPage, 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"
        • role — (map)

          The role used to invoke the model.

          • arnrequired — (String)

            The role ARN.

          • namerequired — (String)

            The role name.

        • inputConfiguration — (map)

          The input configuration.

          • 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"
          • isOpaquerequired — (Boolean)

            For an opaque-model, the input to the model will be a ByteBuffer blob provided in the getPrediction request, and will be passed to SageMaker as-is. For non-opaque models, the input will be constructed by Amazon Fraud Detector based on the model-configuration.

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

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

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

Gets all of the models for the AWS account, or the specified model type, or gets a single model for the specified model type, model ID combination.

Service Reference:

Examples:

Calling the getModels operation

var params = {
  maxResults: 'NUMBER_VALUE',
  modelId: 'STRING_VALUE',
  modelType: ONLINE_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: {})
    • modelType — (String)

      The model type.

      Possible values include:
      • "ONLINE_FRAUD_INSIGHTS"
    • modelId — (String)

      The model ID.

    • nextToken — (String)

      The next token for the request.

    • maxResults — (Integer)

      The maximum 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:

      • nextToken — (String)

        The next token for subsequent requests.

      • models — (Array<map>)

        The returned models.

        • modelId — (String)

          The model ID.

        • modelType — (String)

          The model type.

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

          The model description.

        • trainingDataSource — (map)

          The model training data source in Amazon S3.

          • dataLocationrequired — (String)

            The data location of the training data source.

          • dataAccessRoleArnrequired — (String)

            The data access role ARN for the training data source.

        • modelVariables — (Array<map>)

          The model input variables.

          • namerequired — (String)

            The model variable's name.>

          • index — (Integer)

            The model variable's index.>

        • labelSchema — (map)

          The model label schema.

          • labelKeyrequired — (String)

            The label key.

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

            The label mapper maps the Amazon Fraud Detector supported label to the appropriate source 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 variants for a single Amazon Fraud Detector label.

        • lastUpdatedTime — (String)

          Timestamp of last time the model was updated.

        • createdTime — (String)

          Timestamp of when the model was created.

Returns:

  • (AWS.Request)

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

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

Gets a model version.

Service Reference:

Examples:

Calling the getModelVersion operation

var params = {
  modelId: 'STRING_VALUE', /* required */
  modelType: ONLINE_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"
    • modelVersionNumber — (String)

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

      • modelId — (String)

        The model ID.

      • modelType — (String)

        The model type.

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

        The model version.

      • description — (String)

        The model version description.

      • status — (String)

        The model version status.

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 maxSizePerPage, this actions retrieves a maximum of 10 records per page. If you provide a maxSizePerPage, 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.

      • nextToken — (String)

        The next page token for subsequent requests.

Returns:

  • (AWS.Request)

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

getPrediction(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 getPrediction operation

var params = {
  detectorId: 'STRING_VALUE', /* required */
  eventId: 'STRING_VALUE', /* required */
  detectorVersionId: 'STRING_VALUE',
  eventAttributes: {
    '<attributeKey>': 'STRING_VALUE',
    /* '<attributeKey>': ... */
  },
  externalModelEndpointDataBlobs: {
    '<string>': {
      byteBuffer: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
      contentType: 'STRING_VALUE'
    },
    /* '<string>': ... */
  }
};
frauddetector.getPrediction(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.

    • eventAttributes — (map<String>)

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

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

      • outcomes — (Array<String>)

        The prediction outcomes.

      • modelScores — (Array<map>)

        The model scores for models used in the detector version.

        • modelVersion — (map)

          The model version.

          • modelIdrequired — (String)

            The parent model ID.

          • modelTyperequired — (String)

            The model type.

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

            The model version.

        • scores — (map<Float>)

          The model's fraud prediction scores.

Returns:

  • (AWS.Request)

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

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

Gets all rules available for the specified detector.

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.

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

          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.

        • lastUpdatedTime — (String)

          The time when variable was last updated.

        • createdTime — (String)

          The time when the variable was created.

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

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

Creates or updates a detector.

Service Reference:

Examples:

Calling the putDetector operation

var params = {
  detectorId: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE'
};
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.

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 */
    isOpaque: true || false, /* required */
    csvInputTemplate: 'STRING_VALUE',
    format: TEXT_CSV | APPLICATION_JSON,
    jsonInputTemplate: 'STRING_VALUE'
  },
  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>': ... */
    }
  },
  role: { /* required */
    arn: 'STRING_VALUE', /* required */
    name: 'STRING_VALUE' /* required */
  }
};
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"
    • role — (map)

      The IAM role used to invoke the model endpoint.

      • arnrequired — (String)

        The role ARN.

      • namerequired — (String)

        The role name.

    • inputConfiguration — (map)

      The model endpoint input configuration.

      • 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"
      • isOpaquerequired — (Boolean)

        For an opaque-model, the input to the model will be a ByteBuffer blob provided in the getPrediction request, and will be passed to SageMaker as-is. For non-opaque models, the input will be constructed by Amazon Fraud Detector based on the model-configuration.

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

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.

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

Creates or updates a model.

Service Reference:

Examples:

Calling the putModel operation

var params = {
  labelSchema: { /* required */
    labelKey: 'STRING_VALUE', /* required */
    labelMapper: { /* required */
      '<string>': [
        'STRING_VALUE',
        /* more items */
      ],
      /* '<string>': ... */
    }
  },
  modelId: 'STRING_VALUE', /* required */
  modelType: ONLINE_FRAUD_INSIGHTS, /* required */
  modelVariables: [ /* required */
    {
      name: 'STRING_VALUE', /* required */
      index: 'NUMBER_VALUE'
    },
    /* more items */
  ],
  trainingDataSource: { /* required */
    dataAccessRoleArn: 'STRING_VALUE', /* required */
    dataLocation: 'STRING_VALUE' /* required */
  },
  description: 'STRING_VALUE'
};
frauddetector.putModel(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"
    • description — (String)

      The model description.

    • trainingDataSource — (map)

      The training data source location in Amazon S3.

      • dataLocationrequired — (String)

        The data location of the training data source.

      • dataAccessRoleArnrequired — (String)

        The data access role ARN for the training data source.

    • modelVariables — (Array<map>)

      The model input variables.

      • namerequired — (String)

        The model variable's name.>

      • index — (Integer)

        The model variable's index.>

    • labelSchema — (map)

      The label schema.

      • labelKeyrequired — (String)

        The label key.

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

        The label mapper maps the Amazon Fraud Detector supported label to the appropriate source 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 variants for a single Amazon Fraud Detector label.

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

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, 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, /* required */
      modelVersionNumber: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
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 parent model ID.

      • modelTyperequired — (String)

        The model type.

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

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

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.

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

Updates a model version. You can update the description and status attributes using this action. You can perform the following status updates:

  1. Change the TRAINING_COMPLETE status to ACTIVE

  2. Change ACTIVE back to TRAINING_COMPLETE

Service Reference:

Examples:

Calling the updateModelVersion operation

var params = {
  description: 'STRING_VALUE', /* required */
  modelId: 'STRING_VALUE', /* required */
  modelType: ONLINE_FRAUD_INSIGHTS, /* required */
  modelVersionNumber: 'STRING_VALUE', /* required */
  status: TRAINING_IN_PROGRESS | TRAINING_COMPLETE | ACTIVATE_REQUESTED | ACTIVATE_IN_PROGRESS | ACTIVE | INACTIVATE_IN_PROGRESS | INACTIVE | ERROR /* required */
};
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"
    • modelVersionNumber — (String)

      The model version.

    • description — (String)

      The model description.

    • status — (String)

      The new model status.

      Possible values include:
      • "TRAINING_IN_PROGRESS"
      • "TRAINING_COMPLETE"
      • "ACTIVATE_REQUESTED"
      • "ACTIVATE_IN_PROGRESS"
      • "ACTIVE"
      • "INACTIVATE_IN_PROGRESS"
      • "INACTIVE"
      • "ERROR"

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.

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.

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

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.

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.