:doc:`EventBridge <../../events>` / Client / list_replays

************
list_replays
************



.. py:method:: EventBridge.Client.list_replays(**kwargs)

  

  Lists your replays. You can either list all the replays or you can provide a prefix to match to the replay names. Filter parameters are exclusive.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/eventbridge-2015-10-07/ListReplays>`_  


  **Request Syntax**
  ::

    response = client.list_replays(
        NamePrefix='string',
        State='STARTING'|'RUNNING'|'CANCELLING'|'COMPLETED'|'CANCELLED'|'FAILED',
        EventSourceArn='string',
        NextToken='string',
        Limit=123
    )
    
  :type NamePrefix: string
  :param NamePrefix: 

    A name prefix to filter the replays returned. Only replays with name that match the prefix are returned.

    

  
  :type State: string
  :param State: 

    The state of the replay.

    

  
  :type EventSourceArn: string
  :param EventSourceArn: 

    The ARN of the archive from which the events are replayed.

    

  
  :type NextToken: string
  :param NextToken: 

    The token returned by a previous call, which you can use to retrieve the next set of results.

     

    The value of ``nextToken`` is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged.

     

    Using an expired pagination token results in an ``HTTP 400 InvalidToken`` error.

    

  
  :type Limit: integer
  :param Limit: 

    The maximum number of replays to retrieve.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Replays': [
              {
                  'ReplayName': 'string',
                  'EventSourceArn': 'string',
                  'State': 'STARTING'|'RUNNING'|'CANCELLING'|'COMPLETED'|'CANCELLED'|'FAILED',
                  'StateReason': 'string',
                  'EventStartTime': datetime(2015, 1, 1),
                  'EventEndTime': datetime(2015, 1, 1),
                  'EventLastReplayedTime': datetime(2015, 1, 1),
                  'ReplayStartTime': datetime(2015, 1, 1),
                  'ReplayEndTime': datetime(2015, 1, 1)
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Replays** *(list) --* 

        An array of ``Replay`` objects that contain information about the replay.

        
        

        - *(dict) --* 

          A ``Replay`` object that contains details about a replay.

          
          

          - **ReplayName** *(string) --* 

            The name of the replay.

            
          

          - **EventSourceArn** *(string) --* 

            The ARN of the archive to replay event from.

            
          

          - **State** *(string) --* 

            The current state of the replay.

            
          

          - **StateReason** *(string) --* 

            A description of why the replay is in the current state.

            
          

          - **EventStartTime** *(datetime) --* 

            A time stamp for the time to start replaying events. This is determined by the time in the event as described in `Time <https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html#eventbridge-Type-PutEventsRequestEntry-Time>`__.

            
          

          - **EventEndTime** *(datetime) --* 

            A time stamp for the time to start replaying events. Any event with a creation time prior to the ``EventEndTime`` specified is replayed.

            
          

          - **EventLastReplayedTime** *(datetime) --* 

            A time stamp for the time that the last event was replayed.

            
          

          - **ReplayStartTime** *(datetime) --* 

            A time stamp for the time that the replay started.

            
          

          - **ReplayEndTime** *(datetime) --* 

            A time stamp for the time that the replay completed.

            
      
    
      

      - **NextToken** *(string) --* 

        A token indicating there are more results available. If there are no more results, no token is included in the response.

         

        The value of ``nextToken`` is a unique pagination token for each page. To retrieve the next page of results, make the call again using the returned token. Keep all other arguments unchanged.

         

        Using an expired pagination token results in an ``HTTP 400 InvalidToken`` error.

        
  
  **Exceptions**
  
  *   :py:class:`EventBridge.Client.exceptions.InternalException`

  