2019/12/03 - Amazon Fraud Detector - 30 new api methods
Changes Update frauddetector client to latest version
Deletes the detector version.
See also: AWS API Documentation
Request Syntax
client.delete_detector_version( detectorId='string', detectorVersionId='string' )
string
[REQUIRED]
The ID of the parent detector for the detector version to delete.
string
[REQUIRED]
The ID of the detector version to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Gets all versions for a specified detector.
See also: AWS API Documentation
Request Syntax
client.describe_detector( detectorId='string', nextToken='string', maxResults=123 )
string
[REQUIRED]
The detector ID.
string
The next token from the previous response.
integer
The maximum number of results to return for the request.
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.
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
client.get_external_models( modelEndpoint='string', nextToken='string', maxResults=123 )
string
The Amazon SageMaker model endpoint.
string
The next page token for the request.
integer
The maximum number of objects to return for the request.
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.
(string) --
(string) --
csvIndexToVariableMap (dict) --
A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
(string) --
(string) --
modelEndpointStatus (string) --
The Amazon Fraud Detector status for the external model endpoint
lastUpdatedTime (string) --
Timestamp of when the model was last updated.
createdTime (string) --
Timestamp of when the model was last created.
nextToken (string) --
The next page token to be used in subsequent requests.
Updates a rule version resulting in a new rule version.
See also: AWS API Documentation
Request Syntax
client.update_rule_version( rule={ 'detectorId': 'string', 'ruleId': 'string', 'ruleVersion': 'string' }, description='string', expression='string', language='DETECTORPL', outcomes=[ 'string', ] )
dict
[REQUIRED]
The rule to update.
detectorId (string) -- [REQUIRED]
The detector for which the rule is associated.
ruleId (string) -- [REQUIRED]
The rule ID.
ruleVersion (string) -- [REQUIRED]
The rule version.
string
The description.
string
[REQUIRED]
The rule expression.
string
[REQUIRED]
The language.
list
[REQUIRED]
The outcomes.
(string) --
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.
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
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' )
string
[REQUIRED]
The model endpoints name.
string
[REQUIRED]
The source of the model.
dict
[REQUIRED]
The IAM role used to invoke the model endpoint.
arn (string) -- [REQUIRED]
The role ARN.
name (string) -- [REQUIRED]
The role name.
dict
[REQUIRED]
The model endpoint input configuration.
format (string) --
The format of the model input configuration. The format differs depending on if it is passed through to SageMaker or constructed by Amazon Fraud Detector.
isOpaque (boolean) -- [REQUIRED]
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.
dict
[REQUIRED]
The model endpoint output configuration.
format (string) -- [REQUIRED]
The format of the model output configuration.
jsonKeyToVariableMap (dict) --
A map of JSON keys in response from SageMaker to the Amazon Fraud Detector variables.
(string) --
(string) --
csvIndexToVariableMap (dict) --
A map of CSV index values in the SageMaker response to the Amazon Fraud Detector variables.
(string) --
(string) --
string
[REQUIRED]
The model endpoint’s status in Amazon Fraud Detector.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates a batch of variables.
See also: AWS API Documentation
Request Syntax
client.batch_create_variable( variableEntries=[ { 'name': 'string', 'dataType': 'string', 'dataSource': 'string', 'defaultValue': 'string', 'description': 'string', 'variableType': 'string' }, ] )
list
[REQUIRED]
The list of variables for the batch create variable request.
(dict) --
The variable entry in a list.
name (string) --
The name of the variable entry.
dataType (string) --
The data type of the variable entry.
dataSource (string) --
The data source of the variable entry.
defaultValue (string) --
The default value of the variable entry.
description (string) --
The description of the variable entry.
variableType (string) --
The type of the variable entry.
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.
Creates a version of the model using the specified model type.
See also: AWS API Documentation
Request Syntax
client.create_model_version( modelId='string', modelType='ONLINE_FRAUD_INSIGHTS', description='string' )
string
[REQUIRED]
The model ID.
string
[REQUIRED]
The model type.
string
The model version description.
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.
Gets a particular detector version.
See also: AWS API Documentation
Request Syntax
client.get_detector_version( detectorId='string', detectorVersionId='string' )
string
[REQUIRED]
The detector ID.
string
[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' }
Response Structure
(dict) --
detectorId (string) --
The detector ID.
detectorVersionId (string) --
The detector version ID.
description (string) --
The detector version description.
externalModelEndpoints (list) --
The Amazon SageMaker model endpoints included in the detector version.
(string) --
modelVersions (list) --
The model versions included in the detector version.
(dict) --
The model version.
modelId (string) --
The 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.
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
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' }, ] )
string
[REQUIRED]
The parent detector ID for the detector version you want to update.
string
[REQUIRED]
The detector version ID.
list
[REQUIRED]
The Amazon SageMaker model endpoints to include in the detector version.
(string) --
list
[REQUIRED]
The rules to include in the detector version.
(dict) --
A rule.
detectorId (string) -- [REQUIRED]
The detector for which the rule is associated.
ruleId (string) -- [REQUIRED]
The rule ID.
ruleVersion (string) -- [REQUIRED]
The rule version.
string
The detector version description.
list
The model versions to include in the detector version.
(dict) --
The model version.
modelId (string) -- [REQUIRED]
The parent model ID.
modelType (string) -- [REQUIRED]
The model type.
modelVersionNumber (string) -- [REQUIRED]
The model version.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates a detector version. The detector version starts in a DRAFT status.
See also: AWS API Documentation
Request Syntax
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' }, ] )
string
[REQUIRED]
The ID of the detector under which you want to create a new version.
string
The description of the detector version.
list
The Amazon Sagemaker model endpoints to include in the detector version.
(string) --
list
[REQUIRED]
The rules to include in the detector version.
(dict) --
A rule.
detectorId (string) -- [REQUIRED]
The detector for which the rule is associated.
ruleId (string) -- [REQUIRED]
The rule ID.
ruleVersion (string) -- [REQUIRED]
The rule version.
list
The model versions to include in the detector version.
(dict) --
The model version.
modelId (string) -- [REQUIRED]
The parent model ID.
modelType (string) -- [REQUIRED]
The model type.
modelVersionNumber (string) -- [REQUIRED]
The model version.
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.
Creates a variable.
See also: AWS API Documentation
Request Syntax
client.create_variable( name='string', dataType='STRING'|'INTEGER'|'FLOAT'|'BOOLEAN', dataSource='EVENT'|'MODEL_SCORE'|'EXTERNAL_MODEL_SCORE', defaultValue='string', description='string', variableType='string' )
string
[REQUIRED]
The name of the variable.
string
[REQUIRED]
The data type.
string
[REQUIRED]
The source of the data.
string
[REQUIRED]
The default value for the variable when no value is received.
string
The description.
string
The variable type.
dict
Response Syntax
{}
Response Structure
(dict) --
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
client.get_models( modelType='ONLINE_FRAUD_INSIGHTS', modelId='string', nextToken='string', maxResults=123 )
string
The model type.
string
The model ID.
string
The next token for the request.
integer
The maximum results to return for the request.
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.
(string) --
(list) --
(string) --
lastUpdatedTime (string) --
Timestamp of last time the model was updated.
createdTime (string) --
Timestamp of when the model was created.
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
client.get_prediction( detectorId='string', detectorVersionId='string', eventId='string', eventAttributes={ 'string': 'string' }, externalModelEndpointDataBlobs={ 'string': { 'byteBuffer': b'bytes', 'contentType': 'string' } } )
string
[REQUIRED]
The detector ID.
string
The detector version ID.
string
[REQUIRED]
The unique ID used to identify the event.
dict
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.
(string) --
(string) --
dict
The Amazon SageMaker model endpoint input data blobs.
(string) --
(dict) --
A pre-formed Amazon SageMaker model input you can include if your detector version includes an imported Amazon SageMaker model endpoint with pass-through input configuration.
byteBuffer (bytes) --
The byte buffer of the Amazon SageMaker model endpoint input data blob.
contentType (string) --
The content type of the Amazon SageMaker model endpoint input data blob.
dict
Response Syntax
{ 'outcomes': [ 'string', ], 'modelScores': [ { 'modelVersion': { 'modelId': 'string', 'modelType': 'ONLINE_FRAUD_INSIGHTS', 'modelVersionNumber': 'string' }, 'scores': { 'string': ... } }, ] }
Response Structure
(dict) --
outcomes (list) --
The prediction outcomes.
(string) --
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.
(string) --
(float) --
Gets a model version.
See also: AWS API Documentation
Request Syntax
client.get_model_version( modelId='string', modelType='ONLINE_FRAUD_INSIGHTS', modelVersionNumber='string' )
string
[REQUIRED]
The model ID.
string
[REQUIRED]
The model type.
string
[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.
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
client.get_detectors( detectorId='string', nextToken='string', maxResults=123 )
string
The detector ID.
string
The next token for the subsequent request.
integer
The maximum number of objects to return for the request.
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.
Gets all rules available for the specified detector.
See also: AWS API Documentation
Request Syntax
client.get_rules( ruleId='string', detectorId='string', ruleVersion='string', nextToken='string', maxResults=123 )
string
The rule ID.
string
[REQUIRED]
The detector ID.
string
The rule version.
string
The next page token.
integer
The maximum number of rules to return for the request.
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.
(string) --
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.
Gets a batch of variables.
See also: AWS API Documentation
Request Syntax
client.batch_get_variable( names=[ 'string', ] )
list
[REQUIRED]
The list of variable names to get.
(string) --
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' }, ], 'errors': [ { 'name': 'string', 'code': 123, 'message': 'string' }, ] }
Response Structure
(dict) --
variables (list) --
The returned variables.
(dict) --
The variable.
name (string) --
The name of the variable.
dataType (string) --
The data type of the variable.
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.
errors (list) --
The errors from the request.
(dict) --
Provides the error of the batch get variable API.
name (string) --
The error name.
code (integer) --
The error code.
message (string) --
The error message.
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
client.get_outcomes( name='string', nextToken='string', maxResults=123 )
string
The name of the outcome or outcomes to get.
string
The next page token for the request.
integer
The maximum number of objects to return for the request.
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.
Updates a rule's metadata.
See also: AWS API Documentation
Request Syntax
client.update_rule_metadata( rule={ 'detectorId': 'string', 'ruleId': 'string', 'ruleVersion': 'string' }, description='string' )
dict
[REQUIRED]
The rule to update.
detectorId (string) -- [REQUIRED]
The detector for which the rule is associated.
ruleId (string) -- [REQUIRED]
The rule ID.
ruleVersion (string) -- [REQUIRED]
The rule version.
string
[REQUIRED]
The rule description.
dict
Response Syntax
{}
Response Structure
(dict) --
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
client.update_detector_version_metadata( detectorId='string', detectorVersionId='string', description='string' )
string
[REQUIRED]
The detector ID.
string
[REQUIRED]
The detector version ID.
string
[REQUIRED]
The description.
dict
Response Syntax
{}
Response Structure
(dict) --
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
client.get_variables( name='string', nextToken='string', maxResults=123 )
string
The name of the variable.
string
The next page token of the get variable request.
integer
The max size per page determined for the get variable request.
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.
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
client.update_detector_version_status( detectorId='string', detectorVersionId='string', status='DRAFT'|'ACTIVE'|'INACTIVE' )
string
[REQUIRED]
The detector ID.
string
[REQUIRED]
The detector version ID.
string
[REQUIRED]
The new status.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates or updates an outcome.
See also: AWS API Documentation
Request Syntax
client.put_outcome( name='string', description='string' )
string
[REQUIRED]
The name of the outcome.
string
The outcome description.
dict
Response Syntax
{}
Response Structure
(dict) --
Updates a model version. You can update the description and status attributes using this action. You can perform the following status updates:
Change the TRAINING_COMPLETE status to ACTIVE
Change ACTIVE back to TRAINING_COMPLETE
See also: AWS API Documentation
Request Syntax
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' )
string
[REQUIRED]
The model ID.
string
[REQUIRED]
The model type.
string
[REQUIRED]
The model version.
string
[REQUIRED]
The model description.
string
[REQUIRED]
The new model status.
dict
Response Syntax
{}
Response Structure
(dict) --
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
client.describe_model_versions( modelId='string', modelVersionNumber='string', modelType='ONLINE_FRAUD_INSIGHTS', nextToken='string', maxResults=123 )
string
The model ID.
string
The model version.
string
The model type.
string
The next token from the previous results.
integer
The maximum number of results to return.
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.
(string) --
(list) --
(string) --
validationMetrics (dict) --
The model validation metrics.
(string) --
(string) --
trainingMetrics (dict) --
The model training metrics.
(string) --
(string) --
lastUpdatedTime (string) --
The timestamp when the model was last updated.
createdTime (string) --
The timestamp when the model was created.
nextToken (string) --
The next token.
Deletes the specified event.
See also: AWS API Documentation
Request Syntax
client.delete_event( eventId='string' )
string
[REQUIRED]
The ID of the event to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates or updates a detector.
See also: AWS API Documentation
Request Syntax
client.put_detector( detectorId='string', description='string' )
string
[REQUIRED]
The detector ID.
string
The description of the detector.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates a rule for use with the specified detector.
See also: AWS API Documentation
Request Syntax
client.create_rule( ruleId='string', detectorId='string', description='string', expression='string', language='DETECTORPL', outcomes=[ 'string', ] )
string
[REQUIRED]
The rule ID.
string
[REQUIRED]
The detector ID for the rule's parent detector.
string
The rule description.
string
[REQUIRED]
The rule expression.
string
[REQUIRED]
The language of the rule.
list
[REQUIRED]
The outcome or outcomes returned when the rule expression matches.
(string) --
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.
Updates a variable.
See also: AWS API Documentation
Request Syntax
client.update_variable( name='string', defaultValue='string', description='string', variableType='string' )
string
[REQUIRED]
The name of the variable.
string
The new default value of the variable.
string
The new description.
string
The variable type.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates or updates a model.
See also: AWS API Documentation
Request Syntax
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', ] } } )
string
[REQUIRED]
The model ID.
string
[REQUIRED]
The model type.
string
The model description.
dict
[REQUIRED]
The training data source location in Amazon S3.
dataLocation (string) -- [REQUIRED]
The data location of the training data source.
dataAccessRoleArn (string) -- [REQUIRED]
The data access role ARN for the training data source.
list
[REQUIRED]
The model input variables.
(dict) --
The model variable.>
name (string) -- [REQUIRED]
The model variable's name.>
index (integer) --
The model variable's index.>
dict
[REQUIRED]
The label schema.
labelKey (string) -- [REQUIRED]
The label key.
labelMapper (dict) -- [REQUIRED]
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.
(string) --
(list) --
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --