GetPrediction - Amazon Fraud Detector

GetPrediction

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

Request Syntax

{ "detectorId": "string", "detectorVersionId": "string", "eventAttributes": { "string" : "string" }, "eventId": "string", "externalModelEndpointDataBlobs": { "string" : { "byteBuffer": blob, "contentType": "string" } } }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

detectorId

The detector ID.

Type: String

Required: Yes

detectorVersionId

The detector version ID.

Type: String

Required: No

eventAttributes

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.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 64.

Value Length Constraints: Minimum length of 1. Maximum length of 256.

Required: No

eventId

The unique ID used to identify the event.

Type: String

Required: Yes

externalModelEndpointDataBlobs

The Amazon SageMaker model endpoint input data blobs.

Type: String to ModelEndpointDataBlob object map

Required: No

Response Syntax

{ "modelScores": [ { "modelVersion": { "modelId": "string", "modelType": "string", "modelVersionNumber": "string" }, "scores": { "string" : number } } ], "outcomes": [ "string" ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

modelScores

The model scores for models used in the detector version.

Type: Array of ModelScores objects

outcomes

The prediction outcomes.

Type: Array of strings

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerException

An exception indicating an internal server error.

HTTP Status Code: 500

ResourceNotFoundException

An exception indicating the specified resource was not found.

HTTP Status Code: 400

ThrottlingException

An exception indicating a throttling error.

HTTP Status Code: 400

ValidationException

An exception indicating a specified value is not allowed.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: