Table of Contents
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.
We provide the Query API as well as AWS software development kits (SDK) for Amazon Fraud Detector in Java and Python programming languages.
The Amazon Fraud Detector Query API provides HTTPS requests that use the HTTP verb GET or POST and a Query parameter Action
. AWS SDK provides libraries, sample code, tutorials, and other resources for software developers who prefer to build applications using language-specific APIs instead of submitting a request over HTTP or HTTPS. These libraries provide basic functions that automatically take care of tasks such as cryptographically signing your requests, retrying requests, and handling error responses, so that it is easier for you to get started. For more information about the AWS SDKs, see Tools to build on AWS.
import boto3
client = boto3.client('frauddetector')
These are the available methods:
batch_create_variable()
batch_get_variable()
can_paginate()
cancel_batch_import_job()
cancel_batch_prediction_job()
close()
create_batch_import_job()
create_batch_prediction_job()
create_detector_version()
create_list()
create_model()
create_model_version()
create_rule()
create_variable()
delete_batch_import_job()
delete_batch_prediction_job()
delete_detector()
delete_detector_version()
delete_entity_type()
delete_event()
delete_event_type()
delete_events_by_event_type()
delete_external_model()
delete_label()
delete_list()
delete_model()
delete_model_version()
delete_outcome()
delete_rule()
delete_variable()
describe_detector()
describe_model_versions()
get_batch_import_jobs()
get_batch_prediction_jobs()
get_delete_events_by_event_type_status()
get_detector_version()
get_detectors()
get_entity_types()
get_event()
get_event_prediction()
get_event_prediction_metadata()
get_event_types()
get_external_models()
get_kms_encryption_key()
get_labels()
get_list_elements()
get_lists_metadata()
get_model_version()
get_models()
get_outcomes()
get_paginator()
get_rules()
get_variables()
get_waiter()
list_event_predictions()
list_tags_for_resource()
put_detector()
put_entity_type()
put_event_type()
put_external_model()
put_kms_encryption_key()
put_label()
put_outcome()
send_event()
tag_resource()
untag_resource()
update_detector_version()
update_detector_version_metadata()
update_detector_version_status()
update_event_label()
update_list()
update_model()
update_model_version()
update_model_version_status()
update_rule_metadata()
update_rule_version()
update_variable()
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'
},
]
)
[REQUIRED]
The list of variables for the batch create variable request.
A variable in the list of variables for the batch create variable request.
The name of the variable.
The data type of the variable.
The data source of the variable.
The default value of the variable.
The description of the variable.
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
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
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',
]
)
[REQUIRED]
The list of variable names to get.
{
'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
The returned variables.
The variable.
The name of the variable.
The data type of the variable. For more information see Variable types.
The data source of the variable.
The default value of the variable.
The description of the variable.
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
The time when variable was last updated.
The time when the variable was created.
The ARN of the variable.
The errors from the request.
Provides the error of the batch get variable API.
The error name.
The error code.
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.
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")
.True
if the operation can be paginated,
False
otherwise.cancel_batch_import_job
(**kwargs)¶Cancels an in-progress batch import job.
See also: AWS API Documentation
Request Syntax
response = client.cancel_batch_import_job(
jobId='string'
)
[REQUIRED]
The ID of an in-progress batch import job to cancel.
Amazon Fraud Detector will throw an error if the batch import job is in FAILED
, CANCELED
, or COMPLETED
state.
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
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'
)
[REQUIRED]
The ID of the batch prediction job to cancel.
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
close
()¶Closes underlying endpoint connections.
create_batch_import_job
(**kwargs)¶Creates a batch import job.
See also: AWS API Documentation
Request Syntax
response = client.create_batch_import_job(
jobId='string',
inputPath='string',
outputPath='string',
eventTypeName='string',
iamRoleArn='string',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The ID of the batch import job. The ID cannot be of a past job, unless the job exists in CREATE_FAILED
state.
[REQUIRED]
The URI that points to the Amazon S3 location of your data file.
[REQUIRED]
The URI that points to the Amazon S3 location for storing your results.
[REQUIRED]
The name of the event type.
[REQUIRED]
The ARN of the IAM role created for Amazon S3 bucket that holds your data file.
The IAM role must have read permissions to your input S3 bucket and write permissions to your output S3 bucket. For more information about bucket permissions, see User policy examples in the Amazon S3 User Guide .
A collection of key-value pairs associated with this request.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
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'
},
]
)
[REQUIRED]
The ID of the batch prediction job.
[REQUIRED]
The Amazon S3 location of your training file.
[REQUIRED]
The Amazon S3 location of your output file.
[REQUIRED]
The name of the event type.
[REQUIRED]
The name of the detector.
[REQUIRED]
The ARN of the IAM role to use for this job request.
The IAM Role must have read permissions to your input S3 bucket and write permissions to your output S3 bucket. For more information about bucket permissions, see User policy examples in the Amazon S3 User Guide .
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
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'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
'modelVersionNumber': 'string',
'arn': 'string'
},
],
ruleExecutionMode='ALL_MATCHED'|'FIRST_MATCHED',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The ID of the detector under which you want to create a new version.
The Amazon Sagemaker model endpoints to include in the detector version.
[REQUIRED]
The rules to include in the detector version.
A rule.
The detector for which the rule is associated.
The rule ID.
The rule version.
The model versions to include in the detector version.
The model version.
The model ID.
The model type.
The model version number.
The model version ARN.
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
.
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
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_list
(**kwargs)¶Creates a list.
List is a set of input data for a variable in your event dataset. You use the input data in a rule that's associated with your detector. For more information, see Lists.
See also: AWS API Documentation
Request Syntax
response = client.create_list(
name='string',
elements=[
'string',
],
variableType='string',
description='string',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The name of the list.
The names of the elements, if providing. You can also create an empty list and add elements later using the UpdateList API.
A collection of the key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
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'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
description='string',
eventTypeName='string',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The model ID.
[REQUIRED]
The model type.
[REQUIRED]
The name of the event type.
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
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'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
trainingDataSource='EXTERNAL_EVENTS'|'INGESTED_EVENTS',
trainingDataSchema={
'modelVariables': [
'string',
],
'labelSchema': {
'labelMapper': {
'string': [
'string',
]
},
'unlabeledEventsTreatment': 'IGNORE'|'FRAUD'|'LEGIT'|'AUTO'
}
},
externalEventsDetail={
'dataLocation': 'string',
'dataAccessRoleArn': 'string'
},
ingestedEventsDetail={
'ingestedEventsTimeWindow': {
'startTime': 'string',
'endTime': 'string'
}
},
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The model ID.
[REQUIRED]
The model type.
[REQUIRED]
The training data source location in Amazon S3.
[REQUIRED]
The training data schema.
The training data schema variables.
The label schema.
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.
The action to take for unlabeled events.
IGNORE
if you want the unlabeled events to be ignored. This is recommended when the majority of the events in the dataset are labeled.FRAUD
if you want to categorize all unlabeled events as “Fraud”. This is recommended when most of the events in your dataset are fraudulent.LEGIT
f you want to categorize all unlabeled events as “Legit”. This is recommended when most of the events in your dataset are legitimate.AUTO
if you want Amazon Fraud Detector to decide how to use the unlabeled data. This is recommended when there is significant unlabeled events in the dataset.By default, Amazon Fraud Detector ignores the unlabeled data.
Details of the external events data used for model version training. Required if trainingDataSource
is EXTERNAL_EVENTS
.
The Amazon S3 bucket location for the data.
The ARN of the role that provides Amazon Fraud Detector access to the data location.
Details of the ingested events data used for model version training. Required if trainingDataSource
is INGESTED_EVENTS
.
The start and stop time of the ingested events.
Timestamp of the first ingensted event.
Timestamp of the final ingested event.
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_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.ThrottlingException
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'
},
]
)
[REQUIRED]
The rule ID.
[REQUIRED]
The detector ID for the rule's parent detector.
[REQUIRED]
The rule expression.
[REQUIRED]
The language of the rule.
[REQUIRED]
The outcome or outcomes returned when the rule expression matches.
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
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'
},
]
)
[REQUIRED]
The name of the variable.
[REQUIRED]
The data type.
[REQUIRED]
The source of the data.
[REQUIRED]
The default value for the variable when no value is received.
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
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
delete_batch_import_job
(**kwargs)¶Deletes the specified batch import job ID record. This action does not delete the data that was batch imported.
See also: AWS API Documentation
Request Syntax
response = client.delete_batch_import_job(
jobId='string'
)
[REQUIRED]
The ID of the batch import job to delete.
{}
Response Structure
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'
)
[REQUIRED]
The ID of the batch prediction job to delete.
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
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'
)
[REQUIRED]
The ID of the detector to delete.
{}
Response Structure
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'
)
[REQUIRED]
The ID of the parent detector for the detector version to delete.
[REQUIRED]
The ID of the detector version to delete.
dict
Response Syntax
{}
Response Structure
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'
)
[REQUIRED]
The name of the entity type to delete.
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ConflictException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
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',
deleteAuditHistory=True|False
)
[REQUIRED]
The ID of the event to delete.
[REQUIRED]
The name of the event type.
dict
Response Syntax
{}
Response Structure
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 event type, Amazon Fraud Detector permanently deletes that event 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'
)
[REQUIRED]
The name of the event type to delete.
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ConflictException
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
delete_events_by_event_type
(**kwargs)¶Deletes all events of a particular event type.
See also: AWS API Documentation
Request Syntax
response = client.delete_events_by_event_type(
eventTypeName='string'
)
[REQUIRED]
The name of the event type.
{
'eventTypeName': 'string',
'eventsDeletionStatus': 'string'
}
Response Structure
Name of event type for which to delete the events.
The status of the delete request.
Exceptions
FraudDetector.Client.exceptions.ConflictException
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
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'
)
[REQUIRED]
The endpoint of the Amazon Sagemaker model to delete.
{}
Response Structure
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'
)
[REQUIRED]
The name of the label to delete.
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ConflictException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.InternalServerException
delete_list
(**kwargs)¶Deletes the list, provided it is not used in a rule.
When you delete a list, Amazon Fraud Detector permanently deletes that list and the elements in the list.
See also: AWS API Documentation
Request Syntax
response = client.delete_list(
name='string'
)
[REQUIRED]
The name of the list to delete.
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
FraudDetector.Client.exceptions.ConflictException
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'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS'
)
[REQUIRED]
The model ID of the model to delete.
[REQUIRED]
The model type of the model to delete.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ConflictException
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
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'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
modelVersionNumber='string'
)
[REQUIRED]
The model ID of the model version to delete.
[REQUIRED]
The model type of the model version to delete.
[REQUIRED]
The model version number of the model version to delete.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.AccessDeniedException
FraudDetector.Client.exceptions.ThrottlingException
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'
)
[REQUIRED]
The name of the outcome to delete.
{}
Response Structure
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'
}
)
[REQUIRED]
A rule.
The detector for which the rule is associated.
The rule ID.
The rule version.
{}
Response Structure
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'
)
[REQUIRED]
The name of the variable to delete.
{}
Response Structure
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
)
[REQUIRED]
The detector ID.
dict
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'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
nextToken='string',
maxResults=123
)
dict
Response Syntax
{
'modelVersionDetails': [
{
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
'modelVersionNumber': 'string',
'status': 'string',
'trainingDataSource': 'EXTERNAL_EVENTS'|'INGESTED_EVENTS',
'trainingDataSchema': {
'modelVariables': [
'string',
],
'labelSchema': {
'labelMapper': {
'string': [
'string',
]
},
'unlabeledEventsTreatment': 'IGNORE'|'FRAUD'|'LEGIT'|'AUTO'
}
},
'externalEventsDetail': {
'dataLocation': 'string',
'dataAccessRoleArn': 'string'
},
'ingestedEventsDetail': {
'ingestedEventsTimeWindow': {
'startTime': 'string',
'endTime': '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': {
'logOddsMetrics': [
{
'variableName': 'string',
'variableType': 'string',
'variableImportance': ...
},
]
}
},
'lastUpdatedTime': 'string',
'createdTime': 'string',
'arn': 'string',
'trainingResultV2': {
'dataValidationMetrics': {
'fileLevelMessages': [
{
'title': 'string',
'content': 'string',
'type': 'string'
},
],
'fieldLevelMessages': [
{
'fieldName': 'string',
'identifier': 'string',
'title': 'string',
'content': 'string',
'type': 'string'
},
]
},
'trainingMetricsV2': {
'ofi': {
'metricDataPoints': [
{
'fpr': ...,
'precision': ...,
'tpr': ...,
'threshold': ...
},
],
'modelPerformance': {
'auc': ...,
'uncertaintyRange': {
'lowerBoundValue': ...,
'upperBoundValue': ...
}
}
},
'tfi': {
'metricDataPoints': [
{
'fpr': ...,
'precision': ...,
'tpr': ...,
'threshold': ...
},
],
'modelPerformance': {
'auc': ...,
'uncertaintyRange': {
'lowerBoundValue': ...,
'upperBoundValue': ...
}
}
},
'ati': {
'metricDataPoints': [
{
'cr': ...,
'adr': ...,
'threshold': ...,
'atodr': ...
},
],
'modelPerformance': {
'asi': ...
}
}
},
'variableImportanceMetrics': {
'logOddsMetrics': [
{
'variableName': 'string',
'variableType': 'string',
'variableImportance': ...
},
]
},
'aggregatedVariablesImportanceMetrics': {
'logOddsMetrics': [
{
'variableNames': [
'string',
],
'aggregatedVariablesImportance': ...
},
]
}
}
},
],
'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.
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.
unlabeledEventsTreatment (string) --
The action to take for unlabeled events.
IGNORE
if you want the unlabeled events to be ignored. This is recommended when the majority of the events in the dataset are labeled.FRAUD
if you want to categorize all unlabeled events as “Fraud”. This is recommended when most of the events in your dataset are fraudulent.LEGIT
f you want to categorize all unlabeled events as “Legit”. This is recommended when most of the events in your dataset are legitimate.AUTO
if you want Amazon Fraud Detector to decide how to use the unlabeled data. This is recommended when there is significant unlabeled events in the dataset.By default, Amazon Fraud Detector ignores the unlabeled data.
externalEventsDetail (dict) --
The external events data details. This will be populated if the trainingDataSource
for the model version is specified as EXTERNAL_EVENTS
.
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.
ingestedEventsDetail (dict) --
The ingested events data details. This will be populated if the trainingDataSource
for the model version is specified as INGESTED_EVENTS
.
ingestedEventsTimeWindow (dict) --
The start and stop time of the ingested events.
startTime (string) --
Timestamp of the first ingensted event.
endTime (string) --
Timestamp of the final ingested event.
trainingResult (dict) --
The training results.
dataValidationMetrics (dict) --
The validation metrics.
fileLevelMessages (list) --
The file-specific model training data 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.
logOddsMetrics (list) --
List of variable metrics.
(dict) --
The log odds metric details.
variableName (string) --
The name of the variable.
variableType (string) --
The type of variable.
variableImportance (float) --
The relative importance of the variable. For more information, see Model variable importance.
lastUpdatedTime (string) --
The timestamp when the model was last updated.
createdTime (string) --
The timestamp when the model was created.
arn (string) --
The model version ARN.
trainingResultV2 (dict) --
The training result details. The details include the relative importance of the variables.
dataValidationMetrics (dict) --
The model training data validation metrics.
fileLevelMessages (list) --
The file-specific model training data 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.
trainingMetricsV2 (dict) --
The training metric details.
ofi (dict) --
The Online Fraud Insights (OFI) model training metric details.
metricDataPoints (list) --
The model's performance metrics data points.
(dict) --
The Online Fraud Insights (OFI) 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.
modelPerformance (dict) --
The model's overall performance score.
auc (float) --
The area under the curve (auc). This summarizes the total positive rate (tpr) and false positive rate (FPR) across all possible model score thresholds.
uncertaintyRange (dict) --
Indicates the range of area under curve (auc) expected from the OFI model. A range greater than 0.1 indicates higher model uncertainity.
lowerBoundValue (float) --
The lower bound value of the area under curve (auc).
upperBoundValue (float) --
The lower bound value of the area under curve (auc).
tfi (dict) --
The Transaction Fraud Insights (TFI) model training metric details.
metricDataPoints (list) --
The model's performance metrics data points.
(dict) --
The performance metrics data points for Transaction Fraud Insights (TFI) model.
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.
modelPerformance (dict) --
The model performance score.
auc (float) --
The area under the curve (auc). This summarizes the total positive rate (tpr) and false positive rate (FPR) across all possible model score thresholds.
uncertaintyRange (dict) --
Indicates the range of area under curve (auc) expected from the TFI model. A range greater than 0.1 indicates higher model uncertainity.
lowerBoundValue (float) --
The lower bound value of the area under curve (auc).
upperBoundValue (float) --
The lower bound value of the area under curve (auc).
ati (dict) --
The Account Takeover Insights (ATI) model training metric details.
metricDataPoints (list) --
The model's performance metrics data points.
(dict) --
The Account Takeover Insights (ATI) model performance metrics data points.
cr (float) --
The challenge rate. This indicates the percentage of login events that the model recommends to challenge such as one-time password, multi-factor authentication, and investigations.
adr (float) --
The anomaly discovery rate. This metric quantifies the percentage of anomalies that can be detected by the model at the selected score threshold. A lower score threshold increases the percentage of anomalies captured by the model, but would also require challenging a larger percentage of login events, leading to a higher customer friction.
threshold (float) --
The model's 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.
atodr (float) --
The account takeover discovery rate. This metric quantifies the percentage of account compromise events that can be detected by the model at the selected score threshold. This metric is only available if 50 or more entities with at-least one labeled account takeover event is present in the ingested dataset.
modelPerformance (dict) --
The model's overall performance scores.
asi (float) --
The anomaly separation index (ASI) score. This metric summarizes the overall ability of the model to separate anomalous activities from the normal behavior. Depending on the business, a large fraction of these anomalous activities can be malicious and correspond to the account takeover attacks. A model with no separability power will have the lowest possible ASI score of 0.5, whereas the a model with a high separability power will have the highest possible ASI score of 1.0
variableImportanceMetrics (dict) --
The variable importance metrics details.
logOddsMetrics (list) --
List of variable metrics.
(dict) --
The log odds metric details.
variableName (string) --
The name of the variable.
variableType (string) --
The type of variable.
variableImportance (float) --
The relative importance of the variable. For more information, see Model variable importance.
aggregatedVariablesImportanceMetrics (dict) --
The variable importance metrics of the aggregated variables.
Account Takeover Insights (ATI) model uses event variables from the login data you provide to continuously calculate a set of variables (aggregated variables) based on historical events. For example, your ATI model might calculate the number of times an user has logged in using the same IP address. In this case, event variables used to derive the aggregated variables are IP address
and user
.
logOddsMetrics (list) --
List of variables' metrics.
(dict) --
The log odds metric details.
Account Takeover Insights (ATI) model uses event variables from the login data you provide to continuously calculate a set of variables (aggregated variables) based on historical events. For example, your ATI model might calculate the number of times an user has logged in using the same IP address. In this case, event variables used to derive the aggregated variables are IP address
and user
.
variableNames (list) --
The names of all the variables.
aggregatedVariablesImportance (float) --
The relative importance of the variables in the list to the other event variable.
nextToken (string) --
The next token.
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
get_batch_import_jobs
(**kwargs)¶Gets all batch import jobs or a specific job of the specified ID. This is a paginated API. If you provide a null maxResults
, this action retrieves a maximum of 50 records per page. If you provide a maxResults
, the value must be between 1 and 50. To get the next page results, provide the pagination token from the GetBatchImportJobsResponse
as part of your request. A null pagination token fetches the records from the beginning.
See also: AWS API Documentation
Request Syntax
response = client.get_batch_import_jobs(
jobId='string',
maxResults=123,
nextToken='string'
)
dict
Response Syntax
{
'batchImports': [
{
'jobId': 'string',
'status': 'IN_PROGRESS_INITIALIZING'|'IN_PROGRESS'|'CANCEL_IN_PROGRESS'|'CANCELED'|'COMPLETE'|'FAILED',
'failureReason': 'string',
'startTime': 'string',
'completionTime': 'string',
'inputPath': 'string',
'outputPath': 'string',
'eventTypeName': 'string',
'iamRoleArn': 'string',
'arn': 'string',
'processedRecordsCount': 123,
'failedRecordsCount': 123,
'totalRecordsCount': 123
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
batchImports (list) --
An array containing the details of each batch import job.
(dict) --
The batch import job details.
jobId (string) --
The ID of the batch import job.
status (string) --
The status of the batch import job.
failureReason (string) --
The reason batch import job failed.
startTime (string) --
Timestamp of when the batch import job started.
completionTime (string) --
Timestamp of when batch import job completed.
inputPath (string) --
The Amazon S3 location of your data file for batch import.
outputPath (string) --
The Amazon S3 location of your output file.
eventTypeName (string) --
The name of the event type.
iamRoleArn (string) --
The ARN of the IAM role to use for this job request.
arn (string) --
The ARN of the batch import job.
processedRecordsCount (integer) --
The number of records processed by batch import job.
failedRecordsCount (integer) --
The number of records that failed to import.
totalRecordsCount (integer) --
The total number of records in the batch import job.
nextToken (string) --
The next token for the subsequent resquest.
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
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'
)
dict
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 completed.
lastHeartbeatTime (string) --
Timestamp of most recent heartbeat indicating the batch prediction job was making progress.
inputPath (string) --
The Amazon S3 location of your training file.
outputPath (string) --
The Amazon S3 location of your output file.
eventTypeName (string) --
The name of the event type.
detectorName (string) --
The name of the detector.
detectorVersion (string) --
The detector version.
iamRoleArn (string) --
The ARN of the IAM role to use for this job request.
arn (string) --
The ARN of batch prediction job.
processedRecordsCount (integer) --
The number of records processed by the batch prediction job.
totalRecordsCount (integer) --
The total number of records in the batch prediction job.
nextToken (string) --
The next token for the subsequent request.
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
get_delete_events_by_event_type_status
(**kwargs)¶Retrieves the status of a DeleteEventsByEventType
action.
See also: AWS API Documentation
Request Syntax
response = client.get_delete_events_by_event_type_status(
eventTypeName='string'
)
[REQUIRED]
Name of event type for which to get the deletion status.
{
'eventTypeName': 'string',
'eventsDeletionStatus': 'IN_PROGRESS_INITIALIZING'|'IN_PROGRESS'|'CANCEL_IN_PROGRESS'|'CANCELED'|'COMPLETE'|'FAILED'
}
Response Structure
The event type name.
The deletion status.
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
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'
)
[REQUIRED]
The detector ID.
[REQUIRED]
The detector version ID.
dict
Response Syntax
{
'detectorId': 'string',
'detectorVersionId': 'string',
'description': 'string',
'externalModelEndpoints': [
'string',
],
'modelVersions': [
{
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_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.
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
)
dict
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
)
dict
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.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
get_event
(**kwargs)¶Retrieves details of events stored with Amazon Fraud Detector. This action does not retrieve prediction results.
See also: AWS API Documentation
Request Syntax
response = client.get_event(
eventId='string',
eventTypeName='string'
)
[REQUIRED]
The ID of the event to retrieve.
[REQUIRED]
The event type of the event to retrieve.
dict
Response Syntax
{
'event': {
'eventId': 'string',
'eventTypeName': 'string',
'eventTimestamp': 'string',
'eventVariables': {
'string': 'string'
},
'currentLabel': 'string',
'labelTimestamp': 'string',
'entities': [
{
'entityType': 'string',
'entityId': 'string'
},
]
}
}
Response Structure
(dict) --
event (dict) --
The details of the event.
eventId (string) --
The event ID.
eventTypeName (string) --
The event type.
eventTimestamp (string) --
The timestamp that defines when the event under evaluation occurred. The timestamp must be specified using ISO 8601 standard in UTC.
eventVariables (dict) --
Names of the event type's variables you defined in Amazon Fraud Detector to represent data elements and their corresponding values for the event you are sending for evaluation.
currentLabel (string) --
The label associated with the event.
labelTimestamp (string) --
The timestamp associated with the label to update. The timestamp must be specified using ISO 8601 standard in UTC.
entities (list) --
The event entities.
(dict) --
The entity details.
entityType (string) --
The entity type.
entityId (string) --
The entity ID. If you do not know the entityId
, you can pass unknown
, which is areserved string literal.
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
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'
}
}
)
[REQUIRED]
The detector ID.
[REQUIRED]
The unique ID used to identify the event.
[REQUIRED]
The event type associated with the detector specified for the prediction.
[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."
The entity details.
The entity type.
The entity ID. If you do not know the entityId
, you can pass unknown
, which is areserved string literal.
[REQUIRED]
Timestamp that defines when the event under evaluation occurred. The timestamp must be specified using ISO 8601 standard in UTC.
[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
To ensure most accurate fraud prediction and to simplify your data preparation, Amazon Fraud Detector will replace all missing variables or values as follows:
For Amazon Fraud Detector trained models:
If a null value is provided explicitly for a variable or if a variable is missing, model will replace the null value or the missing variable (no variable name in the eventVariables map) with calculated default mean/medians for numeric variables and with special values for categorical variables.
For imported SageMaker models:
If a null value is provided explicitly for a variable, the model and rules will use “null” as the value. If a variable is not provided (no variable name in the eventVariables map), model and rules will use the default value that is provided for the variable.
The Amazon SageMaker model endpoint input data blobs.
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.
The byte buffer of the Amazon SageMaker model endpoint input data blob.
The content type of the Amazon SageMaker model endpoint input data blob.
dict
Response Syntax
{
'modelScores': [
{
'modelVersion': {
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
'modelVersionNumber': 'string',
'arn': 'string'
},
'scores': {
'string': ...
}
},
],
'ruleResults': [
{
'ruleId': 'string',
'outcomes': [
'string',
]
},
],
'externalModelOutputs': [
{
'externalModel': {
'modelEndpoint': 'string',
'modelSource': 'SAGEMAKER'
},
'outputs': {
'string': '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.
ruleResults (list) --
The results from the rules.
(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.
externalModelOutputs (list) --
The model scores for Amazon SageMaker models.
(dict) --
The fraud prediction scores from Amazon SageMaker model.
externalModel (dict) --
The Amazon SageMaker model.
modelEndpoint (string) --
The endpoint of the Amazon SageMaker model.
modelSource (string) --
The source of the model.
outputs (dict) --
The fraud prediction scores from Amazon SageMaker model.
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
FraudDetector.Client.exceptions.ResourceUnavailableException
get_event_prediction_metadata
(**kwargs)¶Gets details of the past fraud predictions for the specified event ID, event type, detector ID, and detector version ID that was generated in the specified time period.
See also: AWS API Documentation
Request Syntax
response = client.get_event_prediction_metadata(
eventId='string',
eventTypeName='string',
detectorId='string',
detectorVersionId='string',
predictionTimestamp='string'
)
[REQUIRED]
The event ID.
[REQUIRED]
The event type associated with the detector specified for the prediction.
[REQUIRED]
The detector ID.
[REQUIRED]
The detector version ID.
[REQUIRED]
The timestamp that defines when the prediction was generated. The timestamp must be specified using ISO 8601 standard in UTC.
We recommend calling ListEventPredictions first, and using the predictionTimestamp
value in the response to provide an accurate prediction timestamp value.
dict
Response Syntax
{
'eventId': 'string',
'eventTypeName': 'string',
'entityId': 'string',
'entityType': 'string',
'eventTimestamp': 'string',
'detectorId': 'string',
'detectorVersionId': 'string',
'detectorVersionStatus': 'string',
'eventVariables': [
{
'name': 'string',
'value': 'string',
'source': 'string'
},
],
'rules': [
{
'ruleId': 'string',
'ruleVersion': 'string',
'expression': 'string',
'expressionWithValues': 'string',
'outcomes': [
'string',
],
'evaluated': True|False,
'matched': True|False
},
],
'ruleExecutionMode': 'ALL_MATCHED'|'FIRST_MATCHED',
'outcomes': [
'string',
],
'evaluatedModelVersions': [
{
'modelId': 'string',
'modelVersion': 'string',
'modelType': 'string',
'evaluations': [
{
'outputVariableName': 'string',
'evaluationScore': 'string',
'predictionExplanations': {
'variableImpactExplanations': [
{
'eventVariableName': 'string',
'relativeImpact': 'string',
'logOddsImpact': ...
},
],
'aggregatedVariablesImpactExplanations': [
{
'eventVariableNames': [
'string',
],
'relativeImpact': 'string',
'logOddsImpact': ...
},
]
}
},
]
},
],
'evaluatedExternalModels': [
{
'modelEndpoint': 'string',
'useEventVariables': True|False,
'inputVariables': {
'string': 'string'
},
'outputVariables': {
'string': 'string'
}
},
],
'predictionTimestamp': 'string'
}
Response Structure
(dict) --
eventId (string) --
The event ID.
eventTypeName (string) --
The event type associated with the detector specified for this prediction.
entityId (string) --
The entity ID.
entityType (string) --
The entity type.
eventTimestamp (string) --
The timestamp for when the prediction was generated for the associated event ID.
detectorId (string) --
The detector ID.
detectorVersionId (string) --
The detector version ID.
detectorVersionStatus (string) --
The status of the detector version.
eventVariables (list) --
A list of event variables that influenced the prediction scores.
(dict) --
Information about the summary of an event variable that was evaluated for generating prediction.
name (string) --
The event variable name.
value (string) --
The value of the event variable.
source (string) --
The event variable source.
rules (list) --
List of rules associated with the detector version that were used for evaluating variable values.
(dict) --
The details of the rule used for evaluating variable values.
ruleId (string) --
The rule ID.
ruleVersion (string) --
The rule version.
expression (string) --
The rule expression.
expressionWithValues (string) --
The rule expression value.
outcomes (list) --
The rule outcome.
evaluated (boolean) --
Indicates whether the rule was evaluated.
matched (boolean) --
Indicates whether the rule matched.
ruleExecutionMode (string) --
The execution mode of the rule used for evaluating variable values.
outcomes (list) --
The outcomes of the matched rule, based on the rule execution mode.
evaluatedModelVersions (list) --
Model versions that were evaluated for generating predictions.
(dict) --
The model version evaluated for generating prediction.
modelId (string) --
The model ID.
modelVersion (string) --
The model version.
modelType (string) --
The model type.
Valid values: ONLINE_FRAUD_INSIGHTS
| TRANSACTION_FRAUD_INSIGHTS
evaluations (list) --
Evaluations generated for the model version.
(dict) --
The model version evalutions.
outputVariableName (string) --
The output variable name.
evaluationScore (string) --
The evaluation score generated for the model version.
predictionExplanations (dict) --
The prediction explanations generated for the model version.
variableImpactExplanations (list) --
The details of the event variable's impact on the prediction score.
(dict) --
The details of the event variable's impact on the prediction score.
eventVariableName (string) --
The event variable name.
relativeImpact (string) --
The event variable's relative impact in terms of magnitude on the prediction scores. The relative impact values consist of a numerical rating (0-5, 5 being the highest) and direction (increased/decreased) impact of the fraud risk.
logOddsImpact (float) --
The raw, uninterpreted value represented as log-odds of the fraud. These values are usually between -10 to +10, but range from - infinity to + infinity.
aggregatedVariablesImpactExplanations (list) --
The details of the aggregated variables impact on the prediction score.
Account Takeover Insights (ATI) model uses event variables from the login data you provide to continuously calculate a set of variables (aggregated variables) based on historical events. For example, your ATI model might calculate the number of times an user has logged in using the same IP address. In this case, event variables used to derive the aggregated variables are IP address
and user
.
(dict) --
The details of the impact of aggregated variables on the prediction score.
Account Takeover Insights (ATI) model uses the login data you provide to continuously calculate a set of variables (aggregated variables) based on historical events. For example, the model might calculate the number of times an user has logged in using the same IP address. In this case, event variables used to derive the aggregated variables are IP address
and user
.
eventVariableNames (list) --
The names of all the event variables that were used to derive the aggregated variables.
relativeImpact (string) --
The relative impact of the aggregated variables in terms of magnitude on the prediction scores.
logOddsImpact (float) --
The raw, uninterpreted value represented as log-odds of the fraud. These values are usually between -10 to +10, but range from -infinity to +infinity.
evaluatedExternalModels (list) --
External (Amazon SageMaker) models that were evaluated for generating predictions.
(dict) --
The details of the external (Amazon Sagemaker) model evaluated for generating predictions.
modelEndpoint (string) --
The endpoint of the external (Amazon Sagemaker) model.
useEventVariables (boolean) --
Indicates whether event variables were used to generate predictions.
inputVariables (dict) --
Input variables use for generating predictions.
outputVariables (dict) --
Output variables.
predictionTimestamp (string) --
The timestamp that defines when the prediction was generated.
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.AccessDeniedException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.InternalServerException
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
)
dict
Response Syntax
{
'eventTypes': [
{
'name': 'string',
'description': 'string',
'eventVariables': [
'string',
],
'labels': [
'string',
],
'entityTypes': [
'string',
],
'eventIngestion': 'ENABLED'|'DISABLED',
'ingestedEventStatistics': {
'numberOfEvents': 123,
'eventDataSizeInBytes': 123,
'leastRecentEvent': 'string',
'mostRecentEvent': 'string',
'lastUpdatedTime': '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.
labels (list) --
The event type labels.
entityTypes (list) --
The event type entity types.
eventIngestion (string) --
If Enabled
, Amazon Fraud Detector stores event data when you generate a prediction and uses that data to update calculated variables in near real-time. Amazon Fraud Detector uses this data, known as INGESTED_EVENTS
, to train your model and improve fraud predictions.
ingestedEventStatistics (dict) --
Data about the stored events.
numberOfEvents (integer) --
The number of stored events.
eventDataSizeInBytes (integer) --
The total size of the stored events.
leastRecentEvent (string) --
The oldest stored event.
mostRecentEvent (string) --
The newest stored event.
lastUpdatedTime (string) --
Timestamp of when the stored event was last updated.
lastUpdatedTime (string) --
Timestamp of when the event type was last updated.
createdTime (string) --
Timestamp of when the event type was created.
arn (string) --
The entity type ARN.
nextToken (string) --
The next page token.
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
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
)
dict
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.
csvIndexToVariableMap (dict) --
A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
modelEndpointStatus (string) --
The Amazon Fraud Detector status for the external model endpoint
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 KMS key 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()
{
'kmsKey': {
'kmsEncryptionKeyArn': 'string'
}
}
Response Structure
The KMS encryption key.
The encryption key ARN.
Exceptions
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
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
)
dict
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.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
get_list_elements
(**kwargs)¶Gets all the elements in the specified list.
See also: AWS API Documentation
Request Syntax
response = client.get_list_elements(
name='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The name of the list.
dict
Response Syntax
{
'elements': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
elements (list) --
The list elements.
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_lists_metadata
(**kwargs)¶Gets the metadata of either all the lists under the account or the specified list.
See also: AWS API Documentation
Request Syntax
response = client.get_lists_metadata(
name='string',
nextToken='string',
maxResults=123
)
dict
Response Syntax
{
'lists': [
{
'name': 'string',
'description': 'string',
'variableType': 'string',
'createdTime': 'string',
'updatedTime': 'string',
'arn': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
lists (list) --
The metadata of the specified list or all lists under the account.
(dict) --
The metadata of a list.
name (string) --
The name of the list.
description (string) --
The description of the list.
variableType (string) --
The variable type of the list.
createdTime (string) --
The time the list was created.
updatedTime (string) --
The time the list was last updated.
arn (string) --
The ARN of the list.
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_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'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
modelVersionNumber='string'
)
[REQUIRED]
The model ID.
[REQUIRED]
The model type.
[REQUIRED]
The model version number.
dict
Response Syntax
{
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
'modelVersionNumber': 'string',
'trainingDataSource': 'EXTERNAL_EVENTS'|'INGESTED_EVENTS',
'trainingDataSchema': {
'modelVariables': [
'string',
],
'labelSchema': {
'labelMapper': {
'string': [
'string',
]
},
'unlabeledEventsTreatment': 'IGNORE'|'FRAUD'|'LEGIT'|'AUTO'
}
},
'externalEventsDetail': {
'dataLocation': 'string',
'dataAccessRoleArn': 'string'
},
'ingestedEventsDetail': {
'ingestedEventsTimeWindow': {
'startTime': 'string',
'endTime': '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.
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.
unlabeledEventsTreatment (string) --
The action to take for unlabeled events.
IGNORE
if you want the unlabeled events to be ignored. This is recommended when the majority of the events in the dataset are labeled.FRAUD
if you want to categorize all unlabeled events as “Fraud”. This is recommended when most of the events in your dataset are fraudulent.LEGIT
f you want to categorize all unlabeled events as “Legit”. This is recommended when most of the events in your dataset are legitimate.AUTO
if you want Amazon Fraud Detector to decide how to use the unlabeled data. This is recommended when there is significant unlabeled events in the dataset.By default, Amazon Fraud Detector ignores the unlabeled data.
externalEventsDetail (dict) --
The details of the external events data used for training the model version. This will be populated if the trainingDataSource
is EXTERNAL_EVENTS
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.
ingestedEventsDetail (dict) --
The details of the ingested events data used for training the model version. This will be populated if the trainingDataSource
is INGESTED_EVENTS
.
ingestedEventsTimeWindow (dict) --
The start and stop time of the ingested events.
startTime (string) --
Timestamp of the first ingensted event.
endTime (string) --
Timestamp of the final ingested event.
status (string) --
The model version status.
Possible values are:
TRAINING_IN_PROGRESS
TRAINING_COMPLETE
ACTIVATE_REQUESTED
ACTIVATE_IN_PROGRESS
ACTIVE
INACTIVATE_REQUESTED
INACTIVATE_IN_PROGRESS
INACTIVE
ERROR
arn (string) --
The model version ARN.
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
get_models
(**kwargs)¶Gets one or more models. Gets all models for the Amazon Web Services account if no model type and no model id provided. Gets all models for the Amazon Web Services account and model type, if the model type is specified but model id is not provided. Gets a specific model if (model type, model id) tuple is specified.
This is a paginated API. If you provide a null maxResults
, this action retrieves a maximum of 10 records per page. If you provide a maxResults
, the value must be between 1 and 10. To get the next page results, provide the pagination token from the response as part of your request. A null pagination token fetches the records from the beginning.
See also: AWS API Documentation
Request Syntax
response = client.get_models(
modelId='string',
modelType='ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
nextToken='string',
maxResults=123
)
dict
Response Syntax
{
'nextToken': 'string',
'models': [
{
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_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.ThrottlingException
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
)
dict
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.
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")
.client.can_paginate
method to
check if an operation is pageable.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
)
[REQUIRED]
The detector ID.
dict
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.
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
)
dict
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.
list_event_predictions
(**kwargs)¶Gets a list of past predictions. The list can be filtered by detector ID, detector version ID, event ID, event type, or by specifying a time period. If filter is not specified, the most recent prediction is returned.
For example, the following filter lists all past predictions for xyz
event type - { "eventType":{ "value": "xyz" }” }
This is a paginated API. If you provide a null maxResults
, this action will retrieve a maximum of 10 records per page. If you provide a maxResults
, the value must be between 50 and 100. To get the next page results, provide the nextToken
from the response as part of your request. A null nextToken
fetches the records from the beginning.
See also: AWS API Documentation
Request Syntax
response = client.list_event_predictions(
eventId={
'value': 'string'
},
eventType={
'value': 'string'
},
detectorId={
'value': 'string'
},
detectorVersionId={
'value': 'string'
},
predictionTimeRange={
'startTime': 'string',
'endTime': 'string'
},
nextToken='string',
maxResults=123
)
The event ID.
A statement containing a resource property and a value to specify filter condition.
The event type associated with the detector.
A statement containing a resource property and a value to specify filter condition.
The detector ID.
A statement containing a resource property and a value to specify filter condition.
The detector version ID.
A statement containing a resource property and a value to specify filter condition.
The time period for when the predictions were generated.
The start time of the time period for when the predictions were generated.
The end time of the time period for when the predictions were generated.
dict
Response Syntax
{
'eventPredictionSummaries': [
{
'eventId': 'string',
'eventTypeName': 'string',
'eventTimestamp': 'string',
'predictionTimestamp': 'string',
'detectorId': 'string',
'detectorVersionId': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
eventPredictionSummaries (list) --
The summary of the past predictions.
(dict) --
Information about the summary of an event prediction.
eventId (string) --
The event ID.
eventTypeName (string) --
The event type.
eventTimestamp (string) --
The timestamp of the event.
predictionTimestamp (string) --
The timestamp when the prediction was generated.
detectorId (string) --
The detector ID.
detectorVersionId (string) --
The detector version ID.
nextToken (string) --
Identifies the next page of results to return. Use the token to make the call again to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.AccessDeniedException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.InternalServerException
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
)
[REQUIRED]
The ARN that specifies the resource whose tags you want to list.
dict
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.ThrottlingException
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'
},
]
)
[REQUIRED]
The detector ID.
[REQUIRED]
The name of the event type.
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
FraudDetector.Client.exceptions.ConflictException
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'
},
]
)
[REQUIRED]
The name of the entity type.
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
FraudDetector.Client.exceptions.ConflictException
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',
],
eventIngestion='ENABLED'|'DISABLED',
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The name.
[REQUIRED]
The event type variables.
The event type labels.
[REQUIRED]
The entity type for the event type. Example entity types: customer, merchant, account.
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
FraudDetector.Client.exceptions.ConflictException
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'
},
]
)
[REQUIRED]
The model endpoints name.
[REQUIRED]
The source of the model.
[REQUIRED]
The IAM role used to invoke the model endpoint.
[REQUIRED]
The model endpoint input configuration.
The event type name.
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.
The event variables.
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.
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.
[REQUIRED]
The model endpoint output configuration.
The format of the model output configuration.
A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.
A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
[REQUIRED]
The model endpoint’s status in Amazon Fraud Detector.
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
FraudDetector.Client.exceptions.ConflictException
put_kms_encryption_key
(**kwargs)¶Specifies the KMS key 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'
)
[REQUIRED]
The KMS encryption key ARN.
The KMS key must be single-Region key. Amazon Fraud Detector does not support multi-Region KMS key.
{}
Response Structure
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
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'
},
]
)
[REQUIRED]
The label name.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
FraudDetector.Client.exceptions.ConflictException
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'
},
]
)
[REQUIRED]
The name of the outcome.
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
FraudDetector.Client.exceptions.ConflictException
send_event
(**kwargs)¶Stores events in Amazon Fraud Detector without generating fraud predictions for those events. For example, you can use SendEvent
to upload a historical dataset, which you can then later use to train a model.
See also: AWS API Documentation
Request Syntax
response = client.send_event(
eventId='string',
eventTypeName='string',
eventTimestamp='string',
eventVariables={
'string': 'string'
},
assignedLabel='string',
labelTimestamp='string',
entities=[
{
'entityType': 'string',
'entityId': 'string'
},
]
)
[REQUIRED]
The event ID to upload.
[REQUIRED]
The event type name of the event.
[REQUIRED]
The timestamp that defines when the event under evaluation occurred. The timestamp must be specified using ISO 8601 standard in UTC.
[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.
labelTimestamp
.assignedLabel
.[REQUIRED]
An array of entities.
The entity details.
The entity type.
The entity ID. If you do not know the entityId
, you can pass unknown
, which is areserved string literal.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ConflictException
FraudDetector.Client.exceptions.ResourceNotFoundException
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'
},
]
)
[REQUIRED]
The resource ARN.
[REQUIRED]
The tags to assign to the resource.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.ThrottlingException
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',
]
)
[REQUIRED]
The ARN of the resource from which to remove the tag.
[REQUIRED]
The resource ARN.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.ResourceNotFoundException
FraudDetector.Client.exceptions.ThrottlingException
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'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
'modelVersionNumber': 'string',
'arn': 'string'
},
],
ruleExecutionMode='ALL_MATCHED'|'FIRST_MATCHED'
)
[REQUIRED]
The parent detector ID for the detector version you want to update.
[REQUIRED]
The detector version ID.
[REQUIRED]
The Amazon SageMaker model endpoints to include in the detector version.
[REQUIRED]
The rules to include in the detector version.
A rule.
The detector for which the rule is associated.
The rule ID.
The rule version.
The model versions to include in the detector version.
The model version.
The model ID.
The model type.
The model version number.
The model version ARN.
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
.
dict
Response Syntax
{}
Response Structure
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
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'
)
[REQUIRED]
The detector ID.
[REQUIRED]
The detector version ID.
[REQUIRED]
The description.
dict
Response Syntax
{}
Response Structure
Exceptions
FraudDetector.Client.exceptions.ValidationException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ThrottlingException
FraudDetector.Client.exceptions.AccessDeniedException
FraudDetector.Client.exceptions.ConflictException
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'
)
[REQUIRED]
The detector ID.
[REQUIRED]
The detector version ID.
[REQUIRED]
The new status.
The only supported values are ACTIVE
and INACTIVE
dict
Response Syntax
{}
Response Structure
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
update_event_label
(**kwargs)¶Updates the specified event with a new label.
See also: AWS API Documentation
Request Syntax
response = client.update_event_label(
eventId='string',
eventTypeName='string',
assignedLabel='string',
labelTimestamp='string'
)
[REQUIRED]
The ID of the event associated with the label to update.
[REQUIRED]
The event type of the event associated with the label to update.
[REQUIRED]
The new label to assign to the event.
[REQUIRED]
The timestamp associated with the label. The timestamp must be specified using ISO 8601 standard in UTC.
dict
Response Syntax
{}
Response Structure
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
update_list
(**kwargs)¶Updates a list.
See also: AWS API Documentation
Request Syntax
response = client.update_list(
name='string',
elements=[
'string',
],
description='string',
updateMode='REPLACE'|'APPEND'|'REMOVE',
variableType='string'
)
[REQUIRED]
The name of the list to update.
One or more list elements to add or replace. If you are providing the elements, make sure to specify the updateMode
to use.
If you are deleting all elements from the list, use REPLACE
for the updateMode
and provide an empty list (0 elements).
The update mode (type).
APPEND
if you are adding elements to the list.REPLACE
if you replacing existing elements in the list.REMOVE
if you are removing elements from the list.The variable type you want to assign to the list.
Note
You cannot update a variable type of a list that already has a variable type assigned to it. You can assign a variable type to a list only if the list does not already have a variable type.
dict
Response Syntax
{}
Response Structure
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
update_model
(**kwargs)¶Updates model description.
See also: AWS API Documentation
Request Syntax
response = client.update_model(
modelId='string',
modelType='ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
description='string'
)
[REQUIRED]
The model ID.
[REQUIRED]
The model type.
dict
Response Syntax
{}
Response Structure
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
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'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
majorVersionNumber='string',
externalEventsDetail={
'dataLocation': 'string',
'dataAccessRoleArn': 'string'
},
ingestedEventsDetail={
'ingestedEventsTimeWindow': {
'startTime': 'string',
'endTime': 'string'
}
},
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
The model ID.
[REQUIRED]
The model type.
[REQUIRED]
The major version number.
The details of the external events data used for training the model version. Required if trainingDataSource
is EXTERNAL_EVENTS
.
The Amazon S3 bucket location for the data.
The ARN of the role that provides Amazon Fraud Detector access to the data location.
The details of the ingested event used for training the model version. Required if your trainingDataSource
is INGESTED_EVENTS
.
The start and stop time of the ingested events.
Timestamp of the first ingensted event.
Timestamp of the final ingested event.
A collection of key and value pairs.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
Response Syntax
{
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_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.ThrottlingException
FraudDetector.Client.exceptions.InternalServerException
FraudDetector.Client.exceptions.ConflictException
update_model_version_status
(**kwargs)¶Updates the status of a model version.
You can perform the following status updates:
TRAINING_IN_PROGRESS
status to TRAINING_CANCELLED
.TRAINING_COMPLETE
status to ACTIVE
.ACTIVE
to INACTIVE
.See also: AWS API Documentation
Request Syntax
response = client.update_model_version_status(
modelId='string',
modelType='ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
modelVersionNumber='string',
status='ACTIVE'|'INACTIVE'|'TRAINING_CANCELLED'
)
[REQUIRED]
The model ID of the model version to update.
[REQUIRED]
The model type.
[REQUIRED]
The model version number.
[REQUIRED]
The model version status.
dict
Response Syntax
{}
Response Structure
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
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'
)
[REQUIRED]
The rule to update.
The detector for which the rule is associated.
The rule ID.
The rule version.
[REQUIRED]
The rule description.
dict
Response Syntax
{}
Response Structure
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
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'
},
]
)
[REQUIRED]
The rule to update.
The detector for which the rule is associated.
The rule ID.
The rule version.
[REQUIRED]
The rule expression.
[REQUIRED]
The language.
[REQUIRED]
The outcomes.
The tags to assign to the rule version.
A key and value pair.
A tag key.
A value assigned to a tag key.
dict
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
FraudDetector.Client.exceptions.ConflictException
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'
)
[REQUIRED]
The name of the variable.
dict
Response Syntax
{}
Response Structure
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
The available paginators are: