FraudDetector

Table of Contents

Client

class FraudDetector.Client

A low-level client representing Amazon Fraud Detector

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 .

import boto3

client = boto3.client('frauddetector')

These are the available methods:

batch_create_variable(**kwargs)

Creates a batch of variables.

See also: AWS API Documentation

Request Syntax

response = client.batch_create_variable(
    variableEntries=[
        {
            'name': 'string',
            'dataType': 'string',
            'dataSource': 'string',
            'defaultValue': 'string',
            'description': 'string',
            'variableType': 'string'
        },
    ],
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • variableEntries (list) --

    [REQUIRED]

    The list of variables for the batch create variable request.

    • (dict) --

      A variable in 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 (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{
    'errors': [
        {
            'name': 'string',
            'code': 123,
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • errors (list) --

      Provides the errors for the BatchCreateVariable request.

      • (dict) --

        Provides the error of the batch create variable API.

        • name (string) --

          The name.

        • code (integer) --

          The error code.

        • message (string) --

          The error message.

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
batch_get_variable(**kwargs)

Gets a batch of variables.

See also: AWS API Documentation

Request Syntax

response = client.batch_get_variable(
    names=[
        'string',
    ]
)
Parameters
names (list) --

[REQUIRED]

The list of variable names to get.

  • (string) --
Return type
dict
Returns
Response Syntax
{
    'variables': [
        {
            'name': 'string',
            'dataType': 'STRING'|'INTEGER'|'FLOAT'|'BOOLEAN',
            'dataSource': 'EVENT'|'MODEL_SCORE'|'EXTERNAL_MODEL_SCORE',
            'defaultValue': 'string',
            'description': 'string',
            'variableType': 'string',
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
        },
    ],
    'errors': [
        {
            'name': 'string',
            'code': 123,
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • variables (list) --

      The returned variables.

      • (dict) --

        The variable.

        • name (string) --

          The name of the variable.

        • dataType (string) --

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

        • 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 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 (list) --

      The errors from the request.

      • (dict) --

        Provides the error of the batch get variable API.

        • name (string) --

          The error name.

        • code (integer) --

          The error code.

        • message (string) --

          The error message.

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
cancel_batch_prediction_job(**kwargs)

Cancels the specified batch prediction job.

See also: AWS API Documentation

Request Syntax

response = client.cancel_batch_prediction_job(
    jobId='string'
)
Parameters
jobId (string) --

[REQUIRED]

The ID of the batch prediction job to cancel.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
create_batch_prediction_job(**kwargs)

Creates a batch prediction job.

See also: AWS API Documentation

Request Syntax

response = client.create_batch_prediction_job(
    jobId='string',
    inputPath='string',
    outputPath='string',
    eventTypeName='string',
    detectorName='string',
    detectorVersion='string',
    iamRoleArn='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • jobId (string) --

    [REQUIRED]

    The ID of the batch prediction job.

  • inputPath (string) --

    [REQUIRED]

    The Amazon S3 location of your training file.

  • outputPath (string) --

    [REQUIRED]

    The Amazon S3 location of your output file.

  • eventTypeName (string) --

    [REQUIRED]

    The name of the event type.

  • detectorName (string) --

    [REQUIRED]

    The name of the detector.

  • detectorVersion (string) -- The detector version.
  • iamRoleArn (string) --

    [REQUIRED]

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

  • tags (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
create_detector_version(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.create_detector_version(
    detectorId='string',
    description='string',
    externalModelEndpoints=[
        'string',
    ],
    rules=[
        {
            'detectorId': 'string',
            'ruleId': 'string',
            'ruleVersion': 'string'
        },
    ],
    modelVersions=[
        {
            'modelId': 'string',
            'modelType': 'ONLINE_FRAUD_INSIGHTS',
            'modelVersionNumber': 'string',
            'arn': 'string'
        },
    ],
    ruleExecutionMode='ALL_MATCHED'|'FIRST_MATCHED',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • detectorId (string) --

    [REQUIRED]

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

  • description (string) -- The description of the detector version.
  • externalModelEndpoints (list) --

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

    • (string) --
  • rules (list) --

    [REQUIRED]

    The rules to include in the detector version.

    • (dict) --

      A rule.

      • detectorId (string) -- [REQUIRED]

        The detector for which the rule is associated.

      • ruleId (string) -- [REQUIRED]

        The rule ID.

      • ruleVersion (string) -- [REQUIRED]

        The rule version.

  • modelVersions (list) --

    The model versions to include in the detector version.

    • (dict) --

      The model version.

      • modelId (string) -- [REQUIRED]

        The model ID.

      • modelType (string) -- [REQUIRED]

        The model type.

      • modelVersionNumber (string) -- [REQUIRED]

        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 .

  • tags (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{
    'detectorId': 'string',
    'detectorVersionId': 'string',
    'status': 'DRAFT'|'ACTIVE'|'INACTIVE'
}

Response Structure

  • (dict) --

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
create_model(**kwargs)

Creates a model using the specified model type.

See also: AWS API Documentation

Request Syntax

response = client.create_model(
    modelId='string',
    modelType='ONLINE_FRAUD_INSIGHTS',
    description='string',
    eventTypeName='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • modelId (string) --

    [REQUIRED]

    The model ID.

  • modelType (string) --

    [REQUIRED]

    The model type.

  • description (string) -- The model description.
  • eventTypeName (string) --

    [REQUIRED]

    The name of the event type.

  • tags (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
create_model_version(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.create_model_version(
    modelId='string',
    modelType='ONLINE_FRAUD_INSIGHTS',
    trainingDataSource='EXTERNAL_EVENTS',
    trainingDataSchema={
        'modelVariables': [
            'string',
        ],
        'labelSchema': {
            'labelMapper': {
                'string': [
                    'string',
                ]
            }
        }
    },
    externalEventsDetail={
        'dataLocation': 'string',
        'dataAccessRoleArn': 'string'
    },
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • modelId (string) --

    [REQUIRED]

    The model ID.

  • modelType (string) --

    [REQUIRED]

    The model type.

  • trainingDataSource (string) --

    [REQUIRED]

    The training data source location in Amazon S3.

  • trainingDataSchema (dict) --

    [REQUIRED]

    The training data schema.

    • modelVariables (list) -- [REQUIRED]

      The training data schema variables.

      • (string) --
    • labelSchema (dict) -- [REQUIRED]

      The label schema.

      • labelMapper (dict) -- [REQUIRED]

        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.

        • (string) --
          • (list) --
            • (string) --
  • externalEventsDetail (dict) --

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

    • dataLocation (string) -- [REQUIRED]

      The Amazon S3 bucket location for the data.

    • dataAccessRoleArn (string) -- [REQUIRED]

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

  • tags (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{
    'modelId': 'string',
    'modelType': 'ONLINE_FRAUD_INSIGHTS',
    'modelVersionNumber': 'string',
    'status': 'string'
}

Response Structure

  • (dict) --

    • modelId (string) --

      The model ID.

    • modelType (string) --

      The model type.

    • modelVersionNumber (string) --

      The model version number of the model version created.

    • status (string) --

      The model version status.

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.AccessDeniedException
  • FraudDetector.Client.exceptions.InternalServerException
create_rule(**kwargs)

Creates a rule for use with the specified detector.

See also: AWS API Documentation

Request Syntax

response = client.create_rule(
    ruleId='string',
    detectorId='string',
    description='string',
    expression='string',
    language='DETECTORPL',
    outcomes=[
        'string',
    ],
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • ruleId (string) --

    [REQUIRED]

    The rule ID.

  • detectorId (string) --

    [REQUIRED]

    The detector ID for the rule's parent detector.

  • description (string) -- The rule description.
  • expression (string) --

    [REQUIRED]

    The rule expression.

  • language (string) --

    [REQUIRED]

    The language of the rule.

  • outcomes (list) --

    [REQUIRED]

    The outcome or outcomes returned when the rule expression matches.

    • (string) --
  • tags (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{
    'rule': {
        'detectorId': 'string',
        'ruleId': 'string',
        'ruleVersion': 'string'
    }
}

Response Structure

  • (dict) --

    • rule (dict) --

      The created rule.

      • detectorId (string) --

        The detector for which the rule is associated.

      • ruleId (string) --

        The rule ID.

      • ruleVersion (string) --

        The rule version.

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
create_variable(**kwargs)

Creates a variable.

See also: AWS API Documentation

Request Syntax

response = client.create_variable(
    name='string',
    dataType='STRING'|'INTEGER'|'FLOAT'|'BOOLEAN',
    dataSource='EVENT'|'MODEL_SCORE'|'EXTERNAL_MODEL_SCORE',
    defaultValue='string',
    description='string',
    variableType='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • name (string) --

    [REQUIRED]

    The name of the variable.

  • dataType (string) --

    [REQUIRED]

    The data type.

  • dataSource (string) --

    [REQUIRED]

    The source of the data.

  • defaultValue (string) --

    [REQUIRED]

    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 (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
delete_batch_prediction_job(**kwargs)

Deletes a batch prediction job.

See also: AWS API Documentation

Request Syntax

response = client.delete_batch_prediction_job(
    jobId='string'
)
Parameters
jobId (string) --

[REQUIRED]

The ID of the batch prediction job to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
delete_detector(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_detector(
    detectorId='string'
)
Parameters
detectorId (string) --

[REQUIRED]

The ID of the detector to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ConflictException
  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
delete_detector_version(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_detector_version(
    detectorId='string',
    detectorVersionId='string'
)
Parameters
  • detectorId (string) --

    [REQUIRED]

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

  • detectorVersionId (string) --

    [REQUIRED]

    The ID of the detector version to delete.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.ConflictException
  • FraudDetector.Client.exceptions.AccessDeniedException
delete_entity_type(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_entity_type(
    name='string'
)
Parameters
name (string) --

[REQUIRED]

The name of the entity type to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ConflictException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
delete_event(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_event(
    eventId='string',
    eventTypeName='string'
)
Parameters
  • eventId (string) --

    [REQUIRED]

    The ID of the event to delete.

  • eventTypeName (string) --

    [REQUIRED]

    The name of the event type.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
  • FraudDetector.Client.exceptions.ValidationException
delete_event_type(**kwargs)

Deletes an event type.

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

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_event_type(
    name='string'
)
Parameters
name (string) --

[REQUIRED]

The name of the event type to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ConflictException
  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
delete_external_model(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_external_model(
    modelEndpoint='string'
)
Parameters
modelEndpoint (string) --

[REQUIRED]

The endpoint of the Amazon Sagemaker model to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ConflictException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
delete_label(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_label(
    name='string'
)
Parameters
name (string) --

[REQUIRED]

The name of the label to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ConflictException
  • FraudDetector.Client.exceptions.InternalServerException
delete_model(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_model(
    modelId='string',
    modelType='ONLINE_FRAUD_INSIGHTS'
)
Parameters
  • modelId (string) --

    [REQUIRED]

    The model ID of the model to delete.

  • modelType (string) --

    [REQUIRED]

    The model type of the model to delete.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ConflictException
  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
delete_model_version(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_model_version(
    modelId='string',
    modelType='ONLINE_FRAUD_INSIGHTS',
    modelVersionNumber='string'
)
Parameters
  • modelId (string) --

    [REQUIRED]

    The model ID of the model version to delete.

  • modelType (string) --

    [REQUIRED]

    The model type of the model version to delete.

  • modelVersionNumber (string) --

    [REQUIRED]

    The model version number of the model version to delete.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
  • FraudDetector.Client.exceptions.ConflictException
delete_outcome(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_outcome(
    name='string'
)
Parameters
name (string) --

[REQUIRED]

The name of the outcome to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.ConflictException
  • FraudDetector.Client.exceptions.AccessDeniedException
delete_rule(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_rule(
    rule={
        'detectorId': 'string',
        'ruleId': 'string',
        'ruleVersion': 'string'
    }
)
Parameters
rule (dict) --

[REQUIRED]

A rule.

  • detectorId (string) -- [REQUIRED]

    The detector for which the rule is associated.

  • ruleId (string) -- [REQUIRED]

    The rule ID.

  • ruleVersion (string) -- [REQUIRED]

    The rule version.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ConflictException
  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
delete_variable(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_variable(
    name='string'
)
Parameters
name (string) --

[REQUIRED]

The name of the variable to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ConflictException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
describe_detector(**kwargs)

Gets all versions for a specified detector.

See also: AWS API Documentation

Request Syntax

response = client.describe_detector(
    detectorId='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • detectorId (string) --

    [REQUIRED]

    The detector ID.

  • nextToken (string) -- The next token from the previous response.
  • maxResults (integer) -- The maximum number of results to return for the request.
Return type

dict

Returns

Response Syntax

{
    'detectorId': 'string',
    'detectorVersionSummaries': [
        {
            'detectorVersionId': 'string',
            'status': 'DRAFT'|'ACTIVE'|'INACTIVE',
            'description': 'string',
            'lastUpdatedTime': 'string'
        },
    ],
    'nextToken': 'string',
    'arn': 'string'
}

Response Structure

  • (dict) --

    • detectorId (string) --

      The detector ID.

    • detectorVersionSummaries (list) --

      The status and description for each detector version.

      • (dict) --

        The summary of the detector version.

        • detectorVersionId (string) --

          The detector version ID.

        • status (string) --

          The detector version status.

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
describe_model_versions(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.describe_model_versions(
    modelId='string',
    modelVersionNumber='string',
    modelType='ONLINE_FRAUD_INSIGHTS',
    nextToken='string',
    maxResults=123
)
Parameters
  • modelId (string) -- The model ID.
  • modelVersionNumber (string) -- The model version number.
  • modelType (string) -- The model type.
  • nextToken (string) -- The next token from the previous results.
  • maxResults (integer) -- The maximum number of results to return.
Return type

dict

Returns

Response Syntax

{
    'modelVersionDetails': [
        {
            'modelId': 'string',
            'modelType': 'ONLINE_FRAUD_INSIGHTS',
            'modelVersionNumber': 'string',
            'status': 'string',
            'trainingDataSource': 'EXTERNAL_EVENTS',
            'trainingDataSchema': {
                'modelVariables': [
                    'string',
                ],
                'labelSchema': {
                    'labelMapper': {
                        'string': [
                            'string',
                        ]
                    }
                }
            },
            'externalEventsDetail': {
                'dataLocation': 'string',
                'dataAccessRoleArn': 'string'
            },
            'trainingResult': {
                'dataValidationMetrics': {
                    'fileLevelMessages': [
                        {
                            'title': 'string',
                            'content': 'string',
                            'type': 'string'
                        },
                    ],
                    'fieldLevelMessages': [
                        {
                            'fieldName': 'string',
                            'identifier': 'string',
                            'title': 'string',
                            'content': 'string',
                            'type': 'string'
                        },
                    ]
                },
                'trainingMetrics': {
                    'auc': ...,
                    'metricDataPoints': [
                        {
                            'fpr': ...,
                            'precision': ...,
                            'tpr': ...,
                            'threshold': ...
                        },
                    ]
                },
                'variableImportanceMetrics': {
                    'LogitMetrics': [
                        {
                            'variableName': 'string',
                            'variableType': 'string',
                            'variableImportance': ...
                        },
                    ]
                }
            },
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • modelVersionDetails (list) --

      The model version details.

      • (dict) --

        The details of the model version.

        • modelId (string) --

          The model ID.

        • modelType (string) --

          The model type.

        • modelVersionNumber (string) --

          The model version number.

        • status (string) --

          The status of the model version.

        • trainingDataSource (string) --

          The model version training data source.

        • trainingDataSchema (dict) --

          The training data schema.

          • modelVariables (list) --

            The training data schema variables.

            • (string) --
          • labelSchema (dict) --

            The label schema.

            • labelMapper (dict) --

              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.

              • (string) --
                • (list) --
                  • (string) --
        • externalEventsDetail (dict) --

          The event details.

          • dataLocation (string) --

            The Amazon S3 bucket location for the data.

          • dataAccessRoleArn (string) --

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

        • trainingResult (dict) --

          The training results.

          • dataValidationMetrics (dict) --

            The validation metrics.

            • fileLevelMessages (list) --

              The file-specific model training validation messages.

              • (dict) --

                The message details.

                • title (string) --

                  The message title.

                • content (string) --

                  The message content.

                • type (string) --

                  The message type.

            • fieldLevelMessages (list) --

              The field-specific model training validation messages.

              • (dict) --

                The message details.

                • 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 (dict) --

            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 (list) --

              The data points details.

              • (dict) --

                Model performance metrics data points.

                • 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 (dict) --

            The variable importance metrics.

            • LogitMetrics (list) --

              List of variable metrics.

              • (dict) --

                The logit metric details.

                • variableName (string) --

                  The name of the variable.

                • variableType (string) --

                  The type of variable.

                • variableImportance (float) --

                  The relative importance of the variable.

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_batch_prediction_jobs(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.get_batch_prediction_jobs(
    jobId='string',
    maxResults=123,
    nextToken='string'
)
Parameters
  • 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.
Return type

dict

Returns

Response Syntax

{
    'batchPredictions': [
        {
            'jobId': 'string',
            'status': 'IN_PROGRESS_INITIALIZING'|'IN_PROGRESS'|'CANCEL_IN_PROGRESS'|'CANCELED'|'COMPLETE'|'FAILED',
            'failureReason': 'string',
            'startTime': 'string',
            'completionTime': 'string',
            'lastHeartbeatTime': 'string',
            'inputPath': 'string',
            'outputPath': 'string',
            'eventTypeName': 'string',
            'detectorName': 'string',
            'detectorVersion': 'string',
            'iamRoleArn': 'string',
            'arn': 'string',
            'processedRecordsCount': 123,
            'totalRecordsCount': 123
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • batchPredictions (list) --

      An array containing the details of each batch prediction job.

      • (dict) --

        The batch prediction details.

        • jobId (string) --

          The job ID for the batch prediction.

        • status (string) --

          The batch prediction status.

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

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_detector_version(**kwargs)

Gets a particular detector version.

See also: AWS API Documentation

Request Syntax

response = client.get_detector_version(
    detectorId='string',
    detectorVersionId='string'
)
Parameters
  • detectorId (string) --

    [REQUIRED]

    The detector ID.

  • detectorVersionId (string) --

    [REQUIRED]

    The detector version ID.

Return type

dict

Returns

Response Syntax

{
    'detectorId': 'string',
    'detectorVersionId': 'string',
    'description': 'string',
    'externalModelEndpoints': [
        'string',
    ],
    'modelVersions': [
        {
            'modelId': 'string',
            'modelType': 'ONLINE_FRAUD_INSIGHTS',
            'modelVersionNumber': 'string',
            'arn': 'string'
        },
    ],
    'rules': [
        {
            'detectorId': 'string',
            'ruleId': 'string',
            'ruleVersion': 'string'
        },
    ],
    'status': 'DRAFT'|'ACTIVE'|'INACTIVE',
    'lastUpdatedTime': 'string',
    'createdTime': 'string',
    'ruleExecutionMode': 'ALL_MATCHED'|'FIRST_MATCHED',
    'arn': 'string'
}

Response Structure

  • (dict) --

    • detectorId (string) --

      The detector ID.

    • detectorVersionId (string) --

      The detector version ID.

    • description (string) --

      The detector version description.

    • externalModelEndpoints (list) --

      The Amazon SageMaker model endpoints included in the detector version.

      • (string) --
    • modelVersions (list) --

      The model versions included in the detector version.

      • (dict) --

        The model version.

        • modelId (string) --

          The model ID.

        • modelType (string) --

          The model type.

        • modelVersionNumber (string) --

          The model version number.

        • arn (string) --

          The model version ARN.

    • rules (list) --

      The rules included in the detector version.

      • (dict) --

        A rule.

        • detectorId (string) --

          The detector for which the rule is associated.

        • ruleId (string) --

          The rule ID.

        • ruleVersion (string) --

          The rule version.

    • status (string) --

      The status of the detector version.

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

    • arn (string) --

      The detector version ARN.

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_detectors(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.get_detectors(
    detectorId='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • 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.
Return type

dict

Returns

Response Syntax

{
    'detectors': [
        {
            'detectorId': 'string',
            'description': 'string',
            'eventTypeName': 'string',
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • detectors (list) --

      The detectors.

      • (dict) --

        The detector.

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_entity_types(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.get_entity_types(
    name='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • 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.
Return type

dict

Returns

Response Syntax

{
    'entityTypes': [
        {
            'name': 'string',
            'description': 'string',
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • entityTypes (list) --

      An array of entity types.

      • (dict) --

        The entity type details.

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_event_prediction(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.get_event_prediction(
    detectorId='string',
    detectorVersionId='string',
    eventId='string',
    eventTypeName='string',
    entities=[
        {
            'entityType': 'string',
            'entityId': 'string'
        },
    ],
    eventTimestamp='string',
    eventVariables={
        'string': 'string'
    },
    externalModelEndpointDataBlobs={
        'string': {
            'byteBuffer': b'bytes',
            'contentType': 'string'
        }
    }
)
Parameters
  • detectorId (string) --

    [REQUIRED]

    The detector ID.

  • detectorVersionId (string) -- The detector version ID.
  • eventId (string) --

    [REQUIRED]

    The unique ID used to identify the event.

  • eventTypeName (string) --

    [REQUIRED]

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

  • entities (list) --

    [REQUIRED]

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

    • (dict) --

      The entity details.

      • entityType (string) -- [REQUIRED]

        The entity type.

      • entityId (string) -- [REQUIRED]

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

  • eventTimestamp (string) --

    [REQUIRED]

    Timestamp that defines when the event under evaluation occurred.

  • eventVariables (dict) --

    [REQUIRED]

    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.

    Warning

    • You must provide at least one eventVariable
    • If detectorVersion is associated with a modelVersion, you must provide at least one associated eventVariable

    To ensure highest possible 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 External models ( for example, imported SageMaker):

    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.

    • (string) --
      • (string) --
  • externalModelEndpointDataBlobs (dict) --

    The Amazon SageMaker model endpoint input data blobs.

    • (string) --
      • (dict) --

        A pre-formed Amazon SageMaker model input you can include if your detector version includes an imported Amazon SageMaker model endpoint with pass-through input configuration.

        • byteBuffer (bytes) --

          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.

Return type

dict

Returns

Response Syntax

{
    'modelScores': [
        {
            'modelVersion': {
                'modelId': 'string',
                'modelType': 'ONLINE_FRAUD_INSIGHTS',
                'modelVersionNumber': 'string',
                'arn': 'string'
            },
            'scores': {
                'string': ...
            }
        },
    ],
    'ruleResults': [
        {
            'ruleId': 'string',
            'outcomes': [
                'string',
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • modelScores (list) --

      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.

      • (dict) --

        The fraud prediction scores.

        • modelVersion (dict) --

          The model version.

          • modelId (string) --

            The model ID.

          • modelType (string) --

            The model type.

          • modelVersionNumber (string) --

            The model version number.

          • arn (string) --

            The model version ARN.

        • scores (dict) --

          The model's fraud prediction scores.

          • (string) --
            • (float) --
    • ruleResults (list) --

      The results.

      • (dict) --

        The rule results.

        • ruleId (string) --

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

        • outcomes (list) --

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

          • (string) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
  • FraudDetector.Client.exceptions.ConflictException
get_event_types(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.get_event_types(
    name='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • 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.
Return type

dict

Returns

Response Syntax

{
    'eventTypes': [
        {
            'name': 'string',
            'description': 'string',
            'eventVariables': [
                'string',
            ],
            'labels': [
                'string',
            ],
            'entityTypes': [
                'string',
            ],
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • eventTypes (list) --

      An array of event types.

      • (dict) --

        The event type details.

        • name (string) --

          The event type name.

        • description (string) --

          The event type description.

        • eventVariables (list) --

          The event type event variables.

          • (string) --
        • labels (list) --

          The event type labels.

          • (string) --
        • entityTypes (list) --

          The event type entity types.

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_external_models(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.get_external_models(
    modelEndpoint='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • 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.
Return type

dict

Returns

Response Syntax

{
    'externalModels': [
        {
            'modelEndpoint': 'string',
            'modelSource': 'SAGEMAKER',
            'invokeModelEndpointRoleArn': 'string',
            'inputConfiguration': {
                'eventTypeName': 'string',
                'format': 'TEXT_CSV'|'APPLICATION_JSON',
                'useEventVariables': True|False,
                'jsonInputTemplate': 'string',
                'csvInputTemplate': 'string'
            },
            'outputConfiguration': {
                'format': 'TEXT_CSV'|'APPLICATION_JSONLINES',
                'jsonKeyToVariableMap': {
                    'string': 'string'
                },
                'csvIndexToVariableMap': {
                    'string': 'string'
                }
            },
            'modelEndpointStatus': 'ASSOCIATED'|'DISSOCIATED',
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • externalModels (list) --

      Gets the Amazon SageMaker models.

      • (dict) --

        The Amazon SageMaker model.

        • modelEndpoint (string) --

          The Amazon SageMaker model endpoints.

        • modelSource (string) --

          The source of the model.

        • invokeModelEndpointRoleArn (string) --

          The role used to invoke the model.

        • inputConfiguration (dict) --

          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.

          • useEventVariables (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 (dict) --

          The output configuration.

          • format (string) --

            The format of the model output configuration.

          • jsonKeyToVariableMap (dict) --

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

            • (string) --
              • (string) --
          • csvIndexToVariableMap (dict) --

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

            • (string) --
              • (string) --
        • modelEndpointStatus (string) --

          The Amazon Fraud Detector status for the external model endpoint

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_kms_encryption_key()

Gets the encryption key if a Key Management Service (KMS) customer master key (CMK) has been specified to be used to encrypt content in Amazon Fraud Detector.

See also: AWS API Documentation

Request Syntax

response = client.get_kms_encryption_key()
Return type
dict
Returns
Response Syntax
{
    'kmsKey': {
        'kmsEncryptionKeyArn': 'string'
    }
}

Response Structure

  • (dict) --
    • kmsKey (dict) --

      The KMS encryption key.

      • kmsEncryptionKeyArn (string) --

        The encryption key ARN.

Exceptions

  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_labels(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.get_labels(
    name='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • 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.
Return type

dict

Returns

Response Syntax

{
    'labels': [
        {
            'name': 'string',
            'description': 'string',
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • labels (list) --

      An array of labels.

      • (dict) --

        The label details.

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_model_version(**kwargs)

Gets the details of the specified model version.

See also: AWS API Documentation

Request Syntax

response = client.get_model_version(
    modelId='string',
    modelType='ONLINE_FRAUD_INSIGHTS',
    modelVersionNumber='string'
)
Parameters
  • modelId (string) --

    [REQUIRED]

    The model ID.

  • modelType (string) --

    [REQUIRED]

    The model type.

  • modelVersionNumber (string) --

    [REQUIRED]

    The model version number.

Return type

dict

Returns

Response Syntax

{
    'modelId': 'string',
    'modelType': 'ONLINE_FRAUD_INSIGHTS',
    'modelVersionNumber': 'string',
    'trainingDataSource': 'EXTERNAL_EVENTS',
    'trainingDataSchema': {
        'modelVariables': [
            'string',
        ],
        'labelSchema': {
            'labelMapper': {
                'string': [
                    'string',
                ]
            }
        }
    },
    'externalEventsDetail': {
        'dataLocation': 'string',
        'dataAccessRoleArn': 'string'
    },
    'status': 'string',
    'arn': 'string'
}

Response Structure

  • (dict) --

    • modelId (string) --

      The model ID.

    • modelType (string) --

      The model type.

    • modelVersionNumber (string) --

      The model version number.

    • trainingDataSource (string) --

      The training data source.

    • trainingDataSchema (dict) --

      The training data schema.

      • modelVariables (list) --

        The training data schema variables.

        • (string) --
      • labelSchema (dict) --

        The label schema.

        • labelMapper (dict) --

          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.

          • (string) --
            • (list) --
              • (string) --
    • externalEventsDetail (dict) --

      The event details.

      • dataLocation (string) --

        The Amazon S3 bucket location for the data.

      • dataAccessRoleArn (string) --

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

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_models(**kwargs)

Gets one or more models. Gets all models for the AWS account if no model type and no model id provided. Gets all models for the AWS 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.

See also: AWS API Documentation

Request Syntax

response = client.get_models(
    modelId='string',
    modelType='ONLINE_FRAUD_INSIGHTS',
    nextToken='string',
    maxResults=123
)
Parameters
  • modelId (string) -- The model ID.
  • modelType (string) -- The model type.
  • nextToken (string) -- The next token for the subsequent request.
  • maxResults (integer) -- The maximum number of objects to return for the request.
Return type

dict

Returns

Response Syntax

{
    'nextToken': 'string',
    'models': [
        {
            'modelId': 'string',
            'modelType': 'ONLINE_FRAUD_INSIGHTS',
            'description': 'string',
            'eventTypeName': 'string',
            'createdTime': 'string',
            'lastUpdatedTime': 'string',
            'arn': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      The next page token to be used in subsequent requests.

    • models (list) --

      The array of models.

      • (dict) --

        The model.

        • modelId (string) --

          The model ID.

        • modelType (string) --

          The model type.

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_outcomes(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.get_outcomes(
    name='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • 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.
Return type

dict

Returns

Response Syntax

{
    'outcomes': [
        {
            'name': 'string',
            'description': 'string',
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • outcomes (list) --

      The outcomes.

      • (dict) --

        The outcome.

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_rules(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.get_rules(
    ruleId='string',
    detectorId='string',
    ruleVersion='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • ruleId (string) -- The rule ID.
  • detectorId (string) --

    [REQUIRED]

    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.
Return type

dict

Returns

Response Syntax

{
    'ruleDetails': [
        {
            'ruleId': 'string',
            'description': 'string',
            'detectorId': 'string',
            'ruleVersion': 'string',
            'expression': 'string',
            'language': 'DETECTORPL',
            'outcomes': [
                'string',
            ],
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • ruleDetails (list) --

      The details of the requested rule.

      • (dict) --

        The details of the 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.

        • outcomes (list) --

          The rule outcomes.

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_variables(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.get_variables(
    name='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • 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.
Return type

dict

Returns

Response Syntax

{
    'variables': [
        {
            'name': 'string',
            'dataType': 'STRING'|'INTEGER'|'FLOAT'|'BOOLEAN',
            'dataSource': 'EVENT'|'MODEL_SCORE'|'EXTERNAL_MODEL_SCORE',
            'defaultValue': 'string',
            'description': 'string',
            'variableType': 'string',
            'lastUpdatedTime': 'string',
            'createdTime': 'string',
            'arn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • variables (list) --

      The names of the variables returned.

      • (dict) --

        The variable.

        • name (string) --

          The name of the variable.

        • dataType (string) --

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

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

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_tags_for_resource(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    resourceARN='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • resourceARN (string) --

    [REQUIRED]

    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.
Return type

dict

Returns

Response Syntax

{
    'tags': [
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • tags (list) --

      A collection of key and value pairs.

      • (dict) --

        A key and value pair.

        • key (string) --

          A tag key.

        • value (string) --

          A value assigned to a tag key.

    • nextToken (string) --

      The next token for subsequent requests.

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.AccessDeniedException
put_detector(**kwargs)

Creates or updates a detector.

See also: AWS API Documentation

Request Syntax

response = client.put_detector(
    detectorId='string',
    description='string',
    eventTypeName='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • detectorId (string) --

    [REQUIRED]

    The detector ID.

  • description (string) -- The description of the detector.
  • eventTypeName (string) --

    [REQUIRED]

    The name of the event type.

  • tags (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
put_entity_type(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.put_entity_type(
    name='string',
    description='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • name (string) --

    [REQUIRED]

    The name of the entity type.

  • description (string) -- The description.
  • tags (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
put_event_type(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.put_event_type(
    name='string',
    description='string',
    eventVariables=[
        'string',
    ],
    labels=[
        'string',
    ],
    entityTypes=[
        'string',
    ],
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • name (string) --

    [REQUIRED]

    The name.

  • description (string) -- The description of the event type.
  • eventVariables (list) --

    [REQUIRED]

    The event type variables.

    • (string) --
  • labels (list) --

    The event type labels.

    • (string) --
  • entityTypes (list) --

    [REQUIRED]

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

    • (string) --
  • tags (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
put_external_model(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.put_external_model(
    modelEndpoint='string',
    modelSource='SAGEMAKER',
    invokeModelEndpointRoleArn='string',
    inputConfiguration={
        'eventTypeName': 'string',
        'format': 'TEXT_CSV'|'APPLICATION_JSON',
        'useEventVariables': True|False,
        'jsonInputTemplate': 'string',
        'csvInputTemplate': 'string'
    },
    outputConfiguration={
        'format': 'TEXT_CSV'|'APPLICATION_JSONLINES',
        'jsonKeyToVariableMap': {
            'string': 'string'
        },
        'csvIndexToVariableMap': {
            'string': 'string'
        }
    },
    modelEndpointStatus='ASSOCIATED'|'DISSOCIATED',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • modelEndpoint (string) --

    [REQUIRED]

    The model endpoints name.

  • modelSource (string) --

    [REQUIRED]

    The source of the model.

  • invokeModelEndpointRoleArn (string) --

    [REQUIRED]

    The IAM role used to invoke the model endpoint.

  • inputConfiguration (dict) --

    [REQUIRED]

    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.

    • useEventVariables (boolean) -- [REQUIRED]

      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 (dict) --

    [REQUIRED]

    The model endpoint output configuration.

    • format (string) -- [REQUIRED]

      The format of the model output configuration.

    • jsonKeyToVariableMap (dict) --

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

      • (string) --
        • (string) --
    • csvIndexToVariableMap (dict) --

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

      • (string) --
        • (string) --
  • modelEndpointStatus (string) --

    [REQUIRED]

    The model endpoint’s status in Amazon Fraud Detector.

  • tags (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
put_kms_encryption_key(**kwargs)

Specifies the Key Management Service (KMS) customer master key (CMK) to be used to encrypt content in Amazon Fraud Detector.

See also: AWS API Documentation

Request Syntax

response = client.put_kms_encryption_key(
    kmsEncryptionKeyArn='string'
)
Parameters
kmsEncryptionKeyArn (string) --

[REQUIRED]

The KMS encryption key ARN.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
put_label(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.put_label(
    name='string',
    description='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • name (string) --

    [REQUIRED]

    The label name.

  • description (string) -- The label description.
  • tags (list) --
    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
put_outcome(**kwargs)

Creates or updates an outcome.

See also: AWS API Documentation

Request Syntax

response = client.put_outcome(
    name='string',
    description='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • name (string) --

    [REQUIRED]

    The name of the outcome.

  • description (string) -- The outcome description.
  • tags (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
tag_resource(**kwargs)

Assigns tags to a resource.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    resourceARN='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • resourceARN (string) --

    [REQUIRED]

    The resource ARN.

  • tags (list) --

    [REQUIRED]

    The tags to assign to the resource.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.AccessDeniedException
untag_resource(**kwargs)

Removes tags from a resource.

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    resourceARN='string',
    tagKeys=[
        'string',
    ]
)
Parameters
  • resourceARN (string) --

    [REQUIRED]

    The ARN of the resource from which to remove the tag.

  • tagKeys (list) --

    [REQUIRED]

    The resource ARN.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.AccessDeniedException
update_detector_version(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.update_detector_version(
    detectorId='string',
    detectorVersionId='string',
    externalModelEndpoints=[
        'string',
    ],
    rules=[
        {
            'detectorId': 'string',
            'ruleId': 'string',
            'ruleVersion': 'string'
        },
    ],
    description='string',
    modelVersions=[
        {
            'modelId': 'string',
            'modelType': 'ONLINE_FRAUD_INSIGHTS',
            'modelVersionNumber': 'string',
            'arn': 'string'
        },
    ],
    ruleExecutionMode='ALL_MATCHED'|'FIRST_MATCHED'
)
Parameters
  • detectorId (string) --

    [REQUIRED]

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

  • detectorVersionId (string) --

    [REQUIRED]

    The detector version ID.

  • externalModelEndpoints (list) --

    [REQUIRED]

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

    • (string) --
  • rules (list) --

    [REQUIRED]

    The rules to include in the detector version.

    • (dict) --

      A rule.

      • detectorId (string) -- [REQUIRED]

        The detector for which the rule is associated.

      • ruleId (string) -- [REQUIRED]

        The rule ID.

      • ruleVersion (string) -- [REQUIRED]

        The rule version.

  • description (string) -- The detector version description.
  • modelVersions (list) --

    The model versions to include in the detector version.

    • (dict) --

      The model version.

      • modelId (string) -- [REQUIRED]

        The model ID.

      • modelType (string) -- [REQUIRED]

        The model type.

      • modelVersionNumber (string) -- [REQUIRED]

        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 .

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
update_detector_version_metadata(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.update_detector_version_metadata(
    detectorId='string',
    detectorVersionId='string',
    description='string'
)
Parameters
  • detectorId (string) --

    [REQUIRED]

    The detector ID.

  • detectorVersionId (string) --

    [REQUIRED]

    The detector version ID.

  • description (string) --

    [REQUIRED]

    The description.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
update_detector_version_status(**kwargs)

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 .

See also: AWS API Documentation

Request Syntax

response = client.update_detector_version_status(
    detectorId='string',
    detectorVersionId='string',
    status='DRAFT'|'ACTIVE'|'INACTIVE'
)
Parameters
  • detectorId (string) --

    [REQUIRED]

    The detector ID.

  • detectorVersionId (string) --

    [REQUIRED]

    The detector version ID.

  • status (string) --

    [REQUIRED]

    The new status.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
update_model(**kwargs)

Updates a model. You can update the description attribute using this action.

See also: AWS API Documentation

Request Syntax

response = client.update_model(
    modelId='string',
    modelType='ONLINE_FRAUD_INSIGHTS',
    description='string'
)
Parameters
  • modelId (string) --

    [REQUIRED]

    The model ID.

  • modelType (string) --

    [REQUIRED]

    The model type.

  • description (string) -- The new model description.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
update_model_version(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.update_model_version(
    modelId='string',
    modelType='ONLINE_FRAUD_INSIGHTS',
    majorVersionNumber='string',
    externalEventsDetail={
        'dataLocation': 'string',
        'dataAccessRoleArn': 'string'
    },
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • modelId (string) --

    [REQUIRED]

    The model ID.

  • modelType (string) --

    [REQUIRED]

    The model type.

  • majorVersionNumber (string) --

    [REQUIRED]

    The major version number.

  • externalEventsDetail (dict) --

    The event details.

    • dataLocation (string) -- [REQUIRED]

      The Amazon S3 bucket location for the data.

    • dataAccessRoleArn (string) -- [REQUIRED]

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

  • tags (list) --

    A collection of key and value pairs.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{
    'modelId': 'string',
    'modelType': 'ONLINE_FRAUD_INSIGHTS',
    'modelVersionNumber': 'string',
    'status': 'string'
}

Response Structure

  • (dict) --

    • modelId (string) --

      The model ID.

    • modelType (string) --

      The model type.

    • modelVersionNumber (string) --

      The model version number of the model version updated.

    • status (string) --

      The status of the updated model version.

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.AccessDeniedException
  • FraudDetector.Client.exceptions.InternalServerException
update_model_version_status(**kwargs)

Updates the status of a model version.

You can perform the following status updates:

  • Change the TRAINING_COMPLETE status to ACTIVE .
  • Change ACTIVE to INACTIVE .

See also: AWS API Documentation

Request Syntax

response = client.update_model_version_status(
    modelId='string',
    modelType='ONLINE_FRAUD_INSIGHTS',
    modelVersionNumber='string',
    status='ACTIVE'|'INACTIVE'|'TRAINING_CANCELLED'
)
Parameters
  • modelId (string) --

    [REQUIRED]

    The model ID of the model version to update.

  • modelType (string) --

    [REQUIRED]

    The model type.

  • modelVersionNumber (string) --

    [REQUIRED]

    The model version number.

  • status (string) --

    [REQUIRED]

    The model version status.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.AccessDeniedException
update_rule_metadata(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.update_rule_metadata(
    rule={
        'detectorId': 'string',
        'ruleId': 'string',
        'ruleVersion': 'string'
    },
    description='string'
)
Parameters
  • rule (dict) --

    [REQUIRED]

    The rule to update.

    • detectorId (string) -- [REQUIRED]

      The detector for which the rule is associated.

    • ruleId (string) -- [REQUIRED]

      The rule ID.

    • ruleVersion (string) -- [REQUIRED]

      The rule version.

  • description (string) --

    [REQUIRED]

    The rule description.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
update_rule_version(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.update_rule_version(
    rule={
        'detectorId': 'string',
        'ruleId': 'string',
        'ruleVersion': 'string'
    },
    description='string',
    expression='string',
    language='DETECTORPL',
    outcomes=[
        'string',
    ],
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • rule (dict) --

    [REQUIRED]

    The rule to update.

    • detectorId (string) -- [REQUIRED]

      The detector for which the rule is associated.

    • ruleId (string) -- [REQUIRED]

      The rule ID.

    • ruleVersion (string) -- [REQUIRED]

      The rule version.

  • description (string) -- The description.
  • expression (string) --

    [REQUIRED]

    The rule expression.

  • language (string) --

    [REQUIRED]

    The language.

  • outcomes (list) --

    [REQUIRED]

    The outcomes.

    • (string) --
  • tags (list) --

    The tags to assign to the rule version.

    • (dict) --

      A key and value pair.

      • key (string) -- [REQUIRED]

        A tag key.

      • value (string) -- [REQUIRED]

        A value assigned to a tag key.

Return type

dict

Returns

Response Syntax

{
    'rule': {
        'detectorId': 'string',
        'ruleId': 'string',
        'ruleVersion': 'string'
    }
}

Response Structure

  • (dict) --

    • rule (dict) --

      The new rule version that was created.

      • detectorId (string) --

        The detector for which the rule is associated.

      • ruleId (string) --

        The rule ID.

      • ruleVersion (string) --

        The rule version.

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException
update_variable(**kwargs)

Updates a variable.

See also: AWS API Documentation

Request Syntax

response = client.update_variable(
    name='string',
    defaultValue='string',
    description='string',
    variableType='string'
)
Parameters
  • name (string) --

    [REQUIRED]

    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 .
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.ResourceNotFoundException
  • FraudDetector.Client.exceptions.InternalServerException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.AccessDeniedException

Paginators

The available paginators are: