GetEventPredictionMetadata - Amazon Fraud Detector

GetEventPredictionMetadata

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.

Request Syntax

{ "detectorId": "string", "detectorVersionId": "string", "eventId": "string", "eventTypeName": "string", "predictionTimestamp": "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

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

Pattern: ^[0-9a-z_-]+$

Required: Yes

detectorVersionId

The detector version ID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 5.

Pattern: ^([1-9][0-9]*)$

Required: Yes

eventId

The event ID.

Type: String

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

Pattern: ^[0-9a-z_-]+$

Required: Yes

eventTypeName

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

Type: String

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

Pattern: ^[0-9a-z_-]+$

Required: Yes

predictionTimestamp

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.

Type: String

Length Constraints: Minimum length of 11. Maximum length of 30.

Required: Yes

Response Syntax

{ "detectorId": "string", "detectorVersionId": "string", "detectorVersionStatus": "string", "entityId": "string", "entityType": "string", "evaluatedExternalModels": [ { "inputVariables": { "string" : "string" }, "modelEndpoint": "string", "outputVariables": { "string" : "string" }, "useEventVariables": boolean } ], "evaluatedModelVersions": [ { "evaluations": [ { "evaluationScore": "string", "outputVariableName": "string", "predictionExplanations": { "aggregatedVariablesImpactExplanations": [ { "eventVariableNames": [ "string" ], "logOddsImpact": number, "relativeImpact": "string" } ], "variableImpactExplanations": [ { "eventVariableName": "string", "logOddsImpact": number, "relativeImpact": "string" } ] } } ], "modelId": "string", "modelType": "string", "modelVersion": "string" } ], "eventId": "string", "eventTimestamp": "string", "eventTypeName": "string", "eventVariables": [ { "name": "string", "source": "string", "value": "string" } ], "outcomes": [ "string" ], "predictionTimestamp": "string", "ruleExecutionMode": "string", "rules": [ { "evaluated": boolean, "expression": "string", "expressionWithValues": "string", "matched": boolean, "outcomes": [ "string" ], "ruleId": "string", "ruleVersion": "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.

detectorId

The detector ID.

Type: String

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

Pattern: ^[0-9a-z_-]+$

detectorVersionId

The detector version ID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 5.

Pattern: ^([1-9][0-9]*)$

detectorVersionStatus

The status of the detector version.

Type: String

entityId

The entity ID.

Type: String

entityType

The entity type.

Type: String

evaluatedExternalModels

External (Amazon SageMaker) models that were evaluated for generating predictions.

Type: Array of EvaluatedExternalModel objects

evaluatedModelVersions

Model versions that were evaluated for generating predictions.

Type: Array of EvaluatedModelVersion objects

eventId

The event ID.

Type: String

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

Pattern: ^[0-9a-z_-]+$

eventTimestamp

The timestamp for when the prediction was generated for the associated event ID.

Type: String

Length Constraints: Minimum length of 11. Maximum length of 30.

eventTypeName

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

Type: String

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

Pattern: ^[0-9a-z_-]+$

eventVariables

A list of event variables that influenced the prediction scores.

Type: Array of EventVariableSummary objects

outcomes

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

Type: Array of strings

predictionTimestamp

The timestamp that defines when the prediction was generated.

Type: String

Length Constraints: Minimum length of 11. Maximum length of 30.

ruleExecutionMode

The execution mode of the rule used for evaluating variable values.

Type: String

Valid Values: ALL_MATCHED | FIRST_MATCHED

rules

List of rules associated with the detector version that were used for evaluating variable values.

Type: Array of EvaluatedRule objects

Errors

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

AccessDeniedException

An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as PutExternalModel, that specifies a role that is not in your account.

HTTP Status Code: 400

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: