Skip to content

list_transaction_events async

list_transaction_events(
    network: QueryNetwork,
    *,
    config_overrides: Optional[AsyncManagedBlockchainQueryClientConfig] = None,
    transaction_hash: Optional[QueryTransactionHash] = None,
    transaction_id: Optional[QueryTransactionId] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[int] = None,
) -> ListTransactionEventsOutput

Lists all the transaction events for a transaction

This action will return transaction details for all transactions that are confirmed on the blockchain, even if they have not reached finality.

Parameters:

  • transaction_hash (Optional[QueryTransactionHash], default: None ) –

    The hash of a transaction. It is generated when a transaction is created.

  • transaction_id (Optional[QueryTransactionId], default: None ) –

    The identifier of a Bitcoin transaction. It is generated when a transaction is created.

    transactionId is only supported on the Bitcoin networks.

  • network (QueryNetwork) –

    The blockchain network where the transaction events occurred.

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

    The pagination token that indicates the next set of results to retrieve.

  • max_results (Optional[int], default: None ) –

    The maximum number of transaction events to list.

    Default: 100

    Even if additional results can be retrieved, the request can return less results than maxResults or an empty array of results.

    To retrieve the next set of results, make another request with the returned nextToken value. The value of nextToken is null when there are no more results to return

Raises:

  • AccessDeniedException –

    The Amazon Web Services account doesn’t have access to this resource.

  • InternalServerException –

    The request processing has failed because of an internal error in the service.

  • ServiceQuotaExceededException –

    The service quota has been exceeded for this resource.

  • ThrottlingException –

    The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.

  • ValidationException –

    The resource passed is invalid.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_managedblockchain_query/_services/async_managed_blockchain_query.py
async def list_transaction_events(
    self,
    network: "capo_managedblockchain_query.types.query_network.QueryNetwork",
    *,
    config_overrides: Optional[AsyncManagedBlockchainQueryClientConfig] = None,
    transaction_hash: Optional[
        "capo_managedblockchain_query.types.query_transaction_hash.QueryTransactionHash"
    ] = None,
    transaction_id: Optional[
        "capo_managedblockchain_query.types.query_transaction_id.QueryTransactionId"
    ] = None,
    next_token: Optional[
        "capo_managedblockchain_query.types.next_token.NextToken"
    ] = None,
    max_results: Optional[int] = None,
) -> "capo_managedblockchain_query.types.list_transaction_events_output.ListTransactionEventsOutput":
    """<p>Lists all the transaction events for a transaction </p> <note> <p>This action will return transaction details for all transactions that are <i>confirmed</i> on the blockchain, even if they have not reached <a href="https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality">finality</a>. </p> </note>

    Args:
        transaction_hash: <p>The hash of a transaction. It is generated when a transaction is created.</p>
        transaction_id: <p>The identifier of a Bitcoin transaction. It is generated when a transaction is created.</p> <note> <p> <code>transactionId</code> is only supported on the Bitcoin networks.</p> </note>
        network: <p>The blockchain network where the transaction events occurred.</p>
        next_token: <p>The pagination token that indicates the next set of results to retrieve.</p>
        max_results: <p>The maximum number of transaction events to list.</p> <p>Default: <code>100</code> </p> <note> <p>Even if additional results can be retrieved, the request can return less results than <code>maxResults</code> or an empty array of results.</p> <p>To retrieve the next set of results, make another request with the returned <code>nextToken</code> value. The value of <code>nextToken</code> is <code>null</code> when there are no more results to return</p> </note>

    Raises:
        capo_managedblockchain_query.errors.access_denied_exception.AccessDeniedException: <p>The Amazon Web Services account doesn’t have access to this resource. </p>
        capo_managedblockchain_query.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an internal error in the service.</p>
        capo_managedblockchain_query.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota has been exceeded for this resource.</p>
        capo_managedblockchain_query.errors.throttling_exception.ThrottlingException: <p>The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.</p>
        capo_managedblockchain_query.errors.validation_exception.ValidationException: <p>The resource passed is invalid.</p>
        capo_managedblockchain_query.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_managedblockchain_query.types.list_transaction_events_input.ListTransactionEventsInput]",
    ) -> AsyncOperationResponse[
        "capo_managedblockchain_query.types.list_transaction_events_output.ListTransactionEventsOutput"
    ]:
        import capo_managedblockchain_query._operations.tieton_chain_query_service.list_transaction_events

        (
            output,
            http_response,
        ) = await capo_managedblockchain_query._operations.tieton_chain_query_service.list_transaction_events.async_list_transaction_events(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTransactionEvents")
    )
    input_: capo_managedblockchain_query.types.list_transaction_events_input.ListTransactionEventsInput = {
        "network": network
    }
    if transaction_hash is not None:
        input_["transaction_hash"] = transaction_hash
    if transaction_id is not None:
        input_["transaction_id"] = transaction_id
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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