Table of Contents
A low-level client representing Amazon Fraud Detector:
import boto3
client = boto3.client('frauddetector')
These are the available methods:
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'
},
]
)
[REQUIRED]
The list of variables for the batch create variable request.
The variable entry in a list.
The name of the variable entry.
The data type of the variable entry.
The data source of the variable entry.
The default value of the variable entry.
The description of the variable entry.
The type of the variable entry.
{
'errors': [
{
'name': 'string',
'code': 123,
'message': 'string'
},
]
}
Response Structure
Provides the errors for the BatchCreateVariable request.
Provides the error of the batch create variable API.
The name.
The error code.
The error message.
Exceptions
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'
},
],
'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.
The data source of the variable.
The default value of the variable.
The description of the variable.
The variable type of the variable.
The time when variable was last updated.
The time when the variable was created.
The errors from the request.
Provides the error of the batch get variable API.
The error name.
The error code.
The error message.
Exceptions
Check if an operation can be paginated.
Creates a detector version. The detector version starts in a DRAFT status.
See also: AWS API Documentation
Request Syntax
response = client.create_detector_version(
detectorId='string',
description='string',
externalModelEndpoints=[
'string',
],
rules=[
{
'detectorId': 'string',
'ruleId': 'string',
'ruleVersion': 'string'
},
],
modelVersions=[
{
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS',
'modelVersionNumber': 'string'
},
],
ruleExecutionMode='ALL_MATCHED'|'FIRST_MATCHED'
)
[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 parent model ID.
The model type.
The model version.
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 .
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
Creates a version of the model using the specified model type.
See also: AWS API Documentation
Request Syntax
response = client.create_model_version(
modelId='string',
modelType='ONLINE_FRAUD_INSIGHTS',
description='string'
)
[REQUIRED]
The model ID.
[REQUIRED]
The model type.
dict
Response Syntax
{
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS',
'modelVersionNumber': 'string',
'status': 'string'
}
Response Structure
(dict) --
modelId (string) --
The model ID.
modelType (string) --
The model type.
modelVersionNumber (string) --
The version of the model.
status (string) --
The model version status.
Exceptions
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',
]
)
[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.
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
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'
)
[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.
dict
Response Syntax
{}
Response Structure
Exceptions
Deletes the detector. Before deleting a detector, you must first delete all detector versions and rule versions associated with the 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
Deletes the detector version. You cannot delete detector versions that are in ACTIVE status.
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
Deletes the specified event.
See also: AWS API Documentation
Request Syntax
response = client.delete_event(
eventId='string'
)
[REQUIRED]
The ID of the event to delete.
{}
Response Structure
Exceptions
Deletes the rule version. You cannot delete a rule version if it is used by an ACTIVE or INACTIVE detector version.
See also: AWS API Documentation
Request Syntax
response = client.delete_rule_version(
detectorId='string',
ruleId='string',
ruleVersion='string'
)
[REQUIRED]
The ID of the detector that includes the rule version to delete.
[REQUIRED]
The rule ID of the rule version to delete.
[REQUIRED]
The rule version to delete.
dict
Response Syntax
{}
Response Structure
Exceptions
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'
}
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.
Exceptions
Gets all of the model versions for the specified model type or for the specified model type and model ID. You can also get details for a single, specified model version.
See also: AWS API Documentation
Request Syntax
response = client.describe_model_versions(
modelId='string',
modelVersionNumber='string',
modelType='ONLINE_FRAUD_INSIGHTS',
nextToken='string',
maxResults=123
)
dict
Response Syntax
{
'modelVersionDetails': [
{
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS',
'modelVersionNumber': 'string',
'description': 'string',
'status': 'string',
'trainingDataSource': {
'dataLocation': 'string',
'dataAccessRoleArn': 'string'
},
'modelVariables': [
{
'name': 'string',
'index': 123
},
],
'labelSchema': {
'labelKey': 'string',
'labelMapper': {
'string': [
'string',
]
}
},
'validationMetrics': {
'string': 'string'
},
'trainingMetrics': {
'string': 'string'
},
'lastUpdatedTime': 'string',
'createdTime': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
modelVersionDetails (list) --
The model version details.
(dict) --
Provides the model version details.
modelId (string) --
The model ID.
modelType (string) --
The model type.
modelVersionNumber (string) --
The model version.
description (string) --
The model description.
status (string) --
The model status.
trainingDataSource (dict) --
The model training data source.
dataLocation (string) --
The data location of the training data source.
dataAccessRoleArn (string) --
The data access role ARN for the training data source.
modelVariables (list) --
The model variables.
(dict) --
The model variable.>
name (string) --
The model variable's name.>
index (integer) --
The model variable's index.>
labelSchema (dict) --
The model label schema.
labelKey (string) --
The label key.
labelMapper (dict) --
The label mapper maps the Amazon Fraud Detector supported label to the appropriate source labels. For example, if "FRAUD" and "LEGIT" are Amazon Fraud Detector supported labels, this mapper could be: {"FRAUD" => ["0"] , "LEGIT" => ["1"]} or {"FRAUD" => ["false"], "LEGIT" => ["true"]} or {"FRAUD" => ["fraud", "abuse"], "LEGIT" => ["legit", "safe"]} . The value part of the mapper is a list, because you may have multiple variants for a single Amazon Fraud Detector label.
validationMetrics (dict) --
The model validation metrics.
trainingMetrics (dict) --
The model training metrics.
lastUpdatedTime (string) --
The timestamp when the model was last updated.
createdTime (string) --
The timestamp when the model was created.
nextToken (string) --
The next token.
Exceptions
Generate a presigned url given a client, its method, and arguments
The presigned url
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',
'modelVersionNumber': 'string'
},
],
'rules': [
{
'detectorId': 'string',
'ruleId': 'string',
'ruleVersion': 'string'
},
],
'status': 'DRAFT'|'ACTIVE'|'INACTIVE',
'lastUpdatedTime': 'string',
'createdTime': 'string',
'ruleExecutionMode': 'ALL_MATCHED'|'FIRST_MATCHED'
}
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 parent model ID.
modelType (string) --
The model type.
modelVersionNumber (string) --
The model version.
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.
Exceptions
Gets all of detectors. This is a paginated API. If you provide a null maxSizePerPage , this actions retrieves a maximum of 10 records per page. If you provide a maxSizePerPage , the value must be between 5 and 10. To get the next page results, provide the pagination token from the GetEventTypesResponse as part of your request. A null pagination token fetches the records from the beginning.
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',
'lastUpdatedTime': 'string',
'createdTime': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
detectors (list) --
The detectors.
(dict) --
The detector.
detectorId (string) --
The detector ID.
description (string) --
The detector description.
lastUpdatedTime (string) --
Timestamp of when the detector was last updated.
createdTime (string) --
Timestamp of when the detector was created.
nextToken (string) --
The next page token.
Exceptions
Gets the details for one or more Amazon SageMaker models that have been imported into the service. This is a paginated API. If you provide a null maxSizePerPage , this actions retrieves a maximum of 10 records per page. If you provide a maxSizePerPage , the value must be between 5 and 10. To get the next page results, provide the pagination token from the GetExternalModelsResult as part of your request. A null pagination token fetches the records from the beginning.
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',
'role': {
'arn': 'string',
'name': 'string'
},
'inputConfiguration': {
'format': 'TEXT_CSV'|'APPLICATION_JSON',
'isOpaque': 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'
},
],
'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.
role (dict) --
The role used to invoke the model.
arn (string) --
The role ARN.
name (string) --
The role name.
inputConfiguration (dict) --
The input configuration.
format (string) --
The format of the model input configuration. The format differs depending on if it is passed through to SageMaker or constructed by Amazon Fraud Detector.
isOpaque (boolean) --
For an opaque-model, the input to the model will be a ByteBuffer blob provided in the getPrediction request, and will be passed to SageMaker as-is. For non-opaque models, the input will be constructed by Amazon Fraud Detector based on the model-configuration.
jsonInputTemplate (string) --
Template for constructing the JSON input-data sent to SageMaker. At event-evaluation, the placeholders for variable names in the template will be replaced with the variable values before being sent to SageMaker.
csvInputTemplate (string) --
Template for constructing the CSV input-data sent to SageMaker. At event-evaluation, the placeholders for variable-names in the template will be replaced with the variable values before being sent to SageMaker.
outputConfiguration (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.
nextToken (string) --
The next page token to be used in subsequent requests.
Exceptions
Gets a model version.
See also: AWS API Documentation
Request Syntax
response = client.get_model_version(
modelId='string',
modelType='ONLINE_FRAUD_INSIGHTS',
modelVersionNumber='string'
)
[REQUIRED]
The model ID.
[REQUIRED]
The model type.
[REQUIRED]
The model version.
dict
Response Syntax
{
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS',
'modelVersionNumber': 'string',
'description': 'string',
'status': 'string'
}
Response Structure
(dict) --
modelId (string) --
The model ID.
modelType (string) --
The model type.
modelVersionNumber (string) --
The model version.
description (string) --
The model version description.
status (string) --
The model version status.
Exceptions
Gets all of the models for the AWS account, or the specified model type, or gets a single model for the specified model type, model ID combination.
See also: AWS API Documentation
Request Syntax
response = client.get_models(
modelType='ONLINE_FRAUD_INSIGHTS',
modelId='string',
nextToken='string',
maxResults=123
)
dict
Response Syntax
{
'nextToken': 'string',
'models': [
{
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS',
'description': 'string',
'trainingDataSource': {
'dataLocation': 'string',
'dataAccessRoleArn': 'string'
},
'modelVariables': [
{
'name': 'string',
'index': 123
},
],
'labelSchema': {
'labelKey': 'string',
'labelMapper': {
'string': [
'string',
]
}
},
'lastUpdatedTime': 'string',
'createdTime': 'string'
},
]
}
Response Structure
(dict) --
nextToken (string) --
The next token for subsequent requests.
models (list) --
The returned models.
(dict) --
The model.
modelId (string) --
The model ID.
modelType (string) --
The model type.
description (string) --
The model description.
trainingDataSource (dict) --
The model training data source in Amazon S3.
dataLocation (string) --
The data location of the training data source.
dataAccessRoleArn (string) --
The data access role ARN for the training data source.
modelVariables (list) --
The model input variables.
(dict) --
The model variable.>
name (string) --
The model variable's name.>
index (integer) --
The model variable's index.>
labelSchema (dict) --
The model label schema.
labelKey (string) --
The label key.
labelMapper (dict) --
The label mapper maps the Amazon Fraud Detector supported label to the appropriate source labels. For example, if "FRAUD" and "LEGIT" are Amazon Fraud Detector supported labels, this mapper could be: {"FRAUD" => ["0"] , "LEGIT" => ["1"]} or {"FRAUD" => ["false"], "LEGIT" => ["true"]} or {"FRAUD" => ["fraud", "abuse"], "LEGIT" => ["legit", "safe"]} . The value part of the mapper is a list, because you may have multiple variants for a single Amazon Fraud Detector label.
lastUpdatedTime (string) --
Timestamp of last time the model was updated.
createdTime (string) --
Timestamp of when the model was created.
Exceptions
Gets one or more outcomes. This is a paginated API. If you provide a null maxSizePerPage , this actions retrieves a maximum of 10 records per page. If you provide a maxSizePerPage , the value must be between 50 and 100. To get the next page results, provide the pagination token from the GetOutcomesResult as part of your request. A null pagination token fetches the records from the beginning.
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'
},
],
'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.
nextToken (string) --
The next page token for subsequent requests.
Exceptions
Create a paginator for an operation.
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_prediction(
detectorId='string',
detectorVersionId='string',
eventId='string',
eventAttributes={
'string': 'string'
},
externalModelEndpointDataBlobs={
'string': {
'byteBuffer': b'bytes',
'contentType': 'string'
}
}
)
[REQUIRED]
The detector ID.
[REQUIRED]
The unique ID used to identify the event.
Names of variables you defined in Amazon Fraud Detector to represent event data elements and their corresponding values for the event you are sending for evaluation.
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
{
'outcomes': [
'string',
],
'modelScores': [
{
'modelVersion': {
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS',
'modelVersionNumber': 'string'
},
'scores': {
'string': ...
}
},
],
'ruleResults': [
{
'ruleId': 'string',
'outcomes': [
'string',
]
},
]
}
Response Structure
(dict) --
outcomes (list) --
The prediction outcomes.
modelScores (list) --
The model scores for models used in the detector version.
(dict) --
The fraud prediction scores.
modelVersion (dict) --
The model version.
modelId (string) --
The parent model ID.
modelType (string) --
The model type.
modelVersionNumber (string) --
The model version.
scores (dict) --
The model's fraud prediction scores.
ruleResults (list) --
The rule results in the prediction.
(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.
Exceptions
Gets all rules available for the specified detector.
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'
},
],
'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.
nextToken (string) --
The next page token to be used in subsequent requests.
Exceptions
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'
},
],
'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.
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.
lastUpdatedTime (string) --
The time when variable was last updated.
createdTime (string) --
The time when the variable was created.
nextToken (string) --
The next page token to be used in subsequent requests.
Exceptions
Returns an object that can wait for some condition.
Creates or updates a detector.
See also: AWS API Documentation
Request Syntax
response = client.put_detector(
detectorId='string',
description='string'
)
[REQUIRED]
The detector ID.
dict
Response Syntax
{}
Response Structure
Exceptions
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',
role={
'arn': 'string',
'name': 'string'
},
inputConfiguration={
'format': 'TEXT_CSV'|'APPLICATION_JSON',
'isOpaque': True|False,
'jsonInputTemplate': 'string',
'csvInputTemplate': 'string'
},
outputConfiguration={
'format': 'TEXT_CSV'|'APPLICATION_JSONLINES',
'jsonKeyToVariableMap': {
'string': 'string'
},
'csvIndexToVariableMap': {
'string': 'string'
}
},
modelEndpointStatus='ASSOCIATED'|'DISSOCIATED'
)
[REQUIRED]
The model endpoints name.
[REQUIRED]
The source of the model.
[REQUIRED]
The IAM role used to invoke the model endpoint.
The role ARN.
The role name.
[REQUIRED]
The model endpoint input configuration.
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.
For an opaque-model, the input to the model will be a ByteBuffer blob provided in the getPrediction request, and will be passed to SageMaker as-is. For non-opaque models, the input will be constructed by Amazon Fraud Detector based on the model-configuration.
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.
dict
Response Syntax
{}
Response Structure
Exceptions
Creates or updates a model.
See also: AWS API Documentation
Request Syntax
response = client.put_model(
modelId='string',
modelType='ONLINE_FRAUD_INSIGHTS',
description='string',
trainingDataSource={
'dataLocation': 'string',
'dataAccessRoleArn': 'string'
},
modelVariables=[
{
'name': 'string',
'index': 123
},
],
labelSchema={
'labelKey': 'string',
'labelMapper': {
'string': [
'string',
]
}
}
)
[REQUIRED]
The model ID.
[REQUIRED]
The model type.
[REQUIRED]
The training data source location in Amazon S3.
The data location of the training data source.
The data access role ARN for the training data source.
[REQUIRED]
The model input variables.
The model variable.>
The model variable's name.>
The model variable's index.>
[REQUIRED]
The label schema.
The label key.
The label mapper maps the Amazon Fraud Detector supported label to the appropriate source labels. For example, if "FRAUD" and "LEGIT" are Amazon Fraud Detector supported labels, this mapper could be: {"FRAUD" => ["0"] , "LEGIT" => ["1"]} or {"FRAUD" => ["false"], "LEGIT" => ["true"]} or {"FRAUD" => ["fraud", "abuse"], "LEGIT" => ["legit", "safe"]} . The value part of the mapper is a list, because you may have multiple variants for a single Amazon Fraud Detector label.
dict
Response Syntax
{}
Response Structure
Exceptions
Creates or updates an outcome.
See also: AWS API Documentation
Request Syntax
response = client.put_outcome(
name='string',
description='string'
)
[REQUIRED]
The name of the outcome.
dict
Response Syntax
{}
Response Structure
Exceptions
Updates a detector version. The detector version attributes that you can update include models, external model endpoints, rules, and description. You can only update a DRAFT detector version.
See also: AWS API Documentation
Request Syntax
response = client.update_detector_version(
detectorId='string',
detectorVersionId='string',
externalModelEndpoints=[
'string',
],
rules=[
{
'detectorId': 'string',
'ruleId': 'string',
'ruleVersion': 'string'
},
],
description='string',
modelVersions=[
{
'modelId': 'string',
'modelType': 'ONLINE_FRAUD_INSIGHTS',
'modelVersionNumber': 'string'
},
],
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 parent model ID.
The model type.
The model version.
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
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
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.
dict
Response Syntax
{}
Response Structure
Exceptions
Updates a model version. You can update the description and status attributes using this action. You can perform the following status updates:
See also: AWS API Documentation
Request Syntax
response = client.update_model_version(
modelId='string',
modelType='ONLINE_FRAUD_INSIGHTS',
modelVersionNumber='string',
description='string',
status='TRAINING_IN_PROGRESS'|'TRAINING_COMPLETE'|'ACTIVATE_REQUESTED'|'ACTIVATE_IN_PROGRESS'|'ACTIVE'|'INACTIVATE_IN_PROGRESS'|'INACTIVE'|'ERROR'
)
[REQUIRED]
The model ID.
[REQUIRED]
The model type.
[REQUIRED]
The model version.
[REQUIRED]
The model description.
[REQUIRED]
The new model status.
dict
Response Syntax
{}
Response Structure
Exceptions
Updates a rule's metadata.
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
Updates a rule version resulting in a new rule version.
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',
]
)
[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.
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
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
The available paginators are: