list_event_predictions

FraudDetector.Client.list_event_predictions(**kwargs)

Gets a list of past predictions. The list can be filtered by detector ID, detector version ID, event ID, event type, or by specifying a time period. If filter is not specified, the most recent prediction is returned.

For example, the following filter lists all past predictions for xyz event type - { "eventType":{ "value": "xyz" }” }

This is a paginated API. If you provide a null maxResults , this action will retrieve a maximum of 10 records per page. If you provide a maxResults , the value must be between 50 and 100. To get the next page results, provide the nextToken from the response as part of your request. A null nextToken fetches the records from the beginning.

See also: AWS API Documentation

Request Syntax

response = client.list_event_predictions(
    eventId={
        'value': 'string'
    },
    eventType={
        'value': 'string'
    },
    detectorId={
        'value': 'string'
    },
    detectorVersionId={
        'value': 'string'
    },
    predictionTimeRange={
        'startTime': 'string',
        'endTime': 'string'
    },
    nextToken='string',
    maxResults=123
)
Parameters
  • eventId (dict) --

    The event ID.

    • value (string) --

      A statement containing a resource property and a value to specify filter condition.

  • eventType (dict) --

    The event type associated with the detector.

    • value (string) --

      A statement containing a resource property and a value to specify filter condition.

  • detectorId (dict) --

    The detector ID.

    • value (string) --

      A statement containing a resource property and a value to specify filter condition.

  • detectorVersionId (dict) --

    The detector version ID.

    • value (string) --

      A statement containing a resource property and a value to specify filter condition.

  • predictionTimeRange (dict) --

    The time period for when the predictions were generated.

    • startTime (string) -- [REQUIRED]

      The start time of the time period for when the predictions were generated.

    • endTime (string) -- [REQUIRED]

      The end time of the time period for when the predictions were generated.

  • nextToken (string) -- Identifies the next page of results to return. Use the token to make the call again to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.
  • maxResults (integer) -- The maximum number of predictions to return for the request.
Return type

dict

Returns

Response Syntax

{
    'eventPredictionSummaries': [
        {
            'eventId': 'string',
            'eventTypeName': 'string',
            'eventTimestamp': 'string',
            'predictionTimestamp': 'string',
            'detectorId': 'string',
            'detectorVersionId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • eventPredictionSummaries (list) --

      The summary of the past predictions.

      • (dict) --

        Information about the summary of an event prediction.

        • eventId (string) --

          The event ID.

        • eventTypeName (string) --

          The event type.

        • eventTimestamp (string) --

          The timestamp of the event.

        • predictionTimestamp (string) --

          The timestamp when the prediction was generated.

        • detectorId (string) --

          The detector ID.

        • detectorVersionId (string) --

          The detector version ID.

    • nextToken (string) --

      Identifies the next page of results to return. Use the token to make the call again to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours.

Exceptions

  • FraudDetector.Client.exceptions.ValidationException
  • FraudDetector.Client.exceptions.AccessDeniedException
  • FraudDetector.Client.exceptions.ThrottlingException
  • FraudDetector.Client.exceptions.InternalServerException