Skip to content

list_api_destinations async

list_api_destinations(
    *,
    config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
    name_prefix: Optional[ApiDestinationName] = None,
    connection_arn: Optional[ConnectionArn] = None,
    next_token: Optional[NextToken] = None,
    limit: Optional[LimitMax100] = None,
) -> ListApiDestinationsResponse

Retrieves a list of API destination in the account in the current Region.

Parameters:

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

    A name prefix to filter results returned. Only API destinations with a name that starts with the prefix are returned.

  • connection_arn (Optional[ConnectionArn], default: None ) –

    The ARN of the connection specified for the API destination.

  • 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 API destinations to include in the response.

Raises:

Source code in docs_src/capo_eventbridge/_services/async_event_bridge.py
async def list_api_destinations(
    self,
    *,
    config_overrides: Optional[AsyncEventBridgeClientConfig] = None,
    name_prefix: Optional[
        "capo_eventbridge.types.api_destination_name.ApiDestinationName"
    ] = None,
    connection_arn: Optional[
        "capo_eventbridge.types.connection_arn.ConnectionArn"
    ] = None,
    next_token: Optional["capo_eventbridge.types.next_token.NextToken"] = None,
    limit: Optional["capo_eventbridge.types.limit_max100.LimitMax100"] = None,
) -> "capo_eventbridge.types.list_api_destinations_response.ListApiDestinationsResponse":
    """<p>Retrieves a list of API destination in the account in the current Region.</p>

    Args:
        name_prefix: <p>A name prefix to filter results returned. Only API destinations with a name that starts with the prefix are returned.</p>
        connection_arn: <p>The ARN of the connection specified for the API destination.</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 API destinations to include in the response.</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_api_destinations_request.ListApiDestinationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_eventbridge.types.list_api_destinations_response.ListApiDestinationsResponse"
    ]:
        import capo_eventbridge._operations.aws_events.list_api_destinations

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListApiDestinations")
    )
    input_: capo_eventbridge.types.list_api_destinations_request.ListApiDestinationsRequest = {}
    if name_prefix is not None:
        input_["name_prefix"] = name_prefix
    if connection_arn is not None:
        input_["connection_arn"] = connection_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