:doc:`FraudDetector <../../frauddetector>` / Client / list_event_predictions

**********************
list_event_predictions
**********************



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/frauddetector-2019-11-15/ListEventPredictions>`_  


  **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
    )
    
  :type eventId: dict
  :param eventId: 

    The event ID.

    

  
    - **value** *(string) --* 

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

      

    
  
  :type eventType: dict
  :param eventType: 

    The event type associated with the detector.

    

  
    - **value** *(string) --* 

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

      

    
  
  :type detectorId: dict
  :param detectorId: 

    The detector ID.

    

  
    - **value** *(string) --* 

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

      

    
  
  :type detectorVersionId: dict
  :param detectorVersionId: 

    The detector version ID.

    

  
    - **value** *(string) --* 

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

      

    
  
  :type predictionTimeRange: dict
  :param predictionTimeRange: 

    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.

      

    
  
  :type nextToken: string
  :param nextToken: 

    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.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of predictions to return for the request.

    

  
  
  :rtype: 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**
  
  *   :py:class:`FraudDetector.Client.exceptions.ValidationException`

  
  *   :py:class:`FraudDetector.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`FraudDetector.Client.exceptions.ThrottlingException`

  
  *   :py:class:`FraudDetector.Client.exceptions.InternalServerException`

  