getEventPredictionMetadata method
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.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter detectorId :
The detector ID.
Parameter detectorVersionId :
The detector version ID.
Parameter eventId :
The event ID.
Parameter eventTypeName :
The event type associated with the detector specified for the prediction.
Parameter 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.
Implementation
Future<GetEventPredictionMetadataResult> getEventPredictionMetadata({
required String detectorId,
required String detectorVersionId,
required String eventId,
required String eventTypeName,
required String predictionTimestamp,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.GetEventPredictionMetadata'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'detectorId': detectorId,
'detectorVersionId': detectorVersionId,
'eventId': eventId,
'eventTypeName': eventTypeName,
'predictionTimestamp': predictionTimestamp,
},
);
return GetEventPredictionMetadataResult.fromJson(jsonResponse.body);
}