Skip to content

list_replays async

list_replays(
    *,
    config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
    name_prefix: Optional[ReplayName] = None,
    state: Optional[ReplayState] = None,
    event_source_arn: Optional[ArchiveArn] = None,
    next_token: Optional[NextToken] = None,
    limit: Optional[LimitMax100] = None,
) -> ListReplaysResponse

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.

Parameters:

  • name_prefix (Optional[ReplayName], default: None ) –

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

  • state (Optional[ReplayState], default: None ) –

    The state of the replay.

  • event_source_arn (Optional[ArchiveArn], default: None ) –

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

  • next_token (Optional[NextToken], default: None ) –

    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.

  • limit (Optional[LimitMax100], default: None ) –

    The maximum number of replays to retrieve.

Raises:

Source code in docs_src/capo_eventbridge/_services/async_event_bridge.py
async def list_replays(
    self,
    *,
    config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
    name_prefix: Optional["capo_eventbridge.types.replay_name.ReplayName"] = None,
    state: Optional["capo_eventbridge.types.replay_state.ReplayState"] = None,
    event_source_arn: Optional[
        "capo_eventbridge.types.archive_arn.ArchiveArn"
    ] = None,
    next_token: Optional["capo_eventbridge.types.next_token.NextToken"] = None,
    limit: Optional["capo_eventbridge.types.limit_max100.LimitMax100"] = None,
) -> "capo_eventbridge.types.list_replays_response.ListReplaysResponse":
    """<p>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.</p>

    Args:
        name_prefix: <p>A name prefix to filter the replays returned. Only replays with name that match the prefix are returned.</p>
        state: <p>The state of the replay.</p>
        event_source_arn: <p>The ARN of the archive from which the events are replayed.</p>
        next_token: <p>The token returned by a previous call, which you can use to retrieve the next set of results.</p> <p>The value of <code>nextToken</code> 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.</p> <p> Using an expired pagination token results in an <code>HTTP 400 InvalidToken</code> error.</p>
        limit: <p>The maximum number of replays to retrieve.</p>

    Raises:
        capo_eventbridge.errors.internal_exception.InternalException: <p>This exception occurs due to unexpected causes.</p>
        capo_eventbridge.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_eventbridge.types.list_replays_request.ListReplaysRequest]",
    ) -> AsyncOperationResponse[
        "capo_eventbridge.types.list_replays_response.ListReplaysResponse"
    ]:
        import capo_eventbridge._operations.aws_events.list_replays

        (
            output,
            http_response,
        ) = await capo_eventbridge._operations.aws_events.list_replays.async_list_replays(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListReplays")
    )
    input_: capo_eventbridge.types.list_replays_request.ListReplaysRequest = {}
    if name_prefix is not None:
        input_["name_prefix"] = name_prefix
    if state is not None:
        input_["state"] = state
    if event_source_arn is not None:
        input_["event_source_arn"] = event_source_arn
    if next_token is not None:
        input_["next_token"] = next_token
    if limit is not None:
        input_["limit"] = limit

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output