Skip to content

list_transactions

list_transactions(
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
    status_filter: Optional[TransactionStatusFilter] = None,
    max_results: Optional[PageSize] = None,
    next_token: Optional[TokenString] = None,
) -> ListTransactionsResponse

Returns metadata about transactions and their status. To prevent the response from growing indefinitely, only uncommitted transactions and those available for time-travel queries are returned.

This operation can help you identify uncommitted transactions or to get information about transactions.

Parameters:

  • catalog_id (Optional[CatalogIdString], default: None ) –

    The catalog for which to list transactions. Defaults to the account ID of the caller.

  • status_filter (Optional[TransactionStatusFilter], default: None ) –

    A filter indicating the status of transactions to return. Options are ALL | COMPLETED | COMMITTED | ABORTED | ACTIVE. The default is ALL.

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

    The maximum number of transactions to return in a single call.

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

    A continuation token if this is not the first call to retrieve transactions.

Raises:

Source code in docs_src/capo_lakeformation/_services/lake_formation.py
def list_transactions(
    self,
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
    catalog_id: Optional[
        "capo_lakeformation.types.catalog_id_string.CatalogIdString"
    ] = None,
    status_filter: Optional[
        "capo_lakeformation.types.transaction_status_filter.TransactionStatusFilter"
    ] = None,
    max_results: Optional["capo_lakeformation.types.page_size.PageSize"] = None,
    next_token: Optional[
        "capo_lakeformation.types.token_string.TokenString"
    ] = None,
) -> "capo_lakeformation.types.list_transactions_response.ListTransactionsResponse":
    """<p>Returns metadata about transactions and their status. To prevent the response from growing indefinitely, only uncommitted transactions and those available for time-travel queries are returned.</p> <p>This operation can help you identify uncommitted transactions or to get information about transactions.</p>

    Args:
        catalog_id: <p>The catalog for which to list transactions. Defaults to the account ID of the caller.</p>
        status_filter: <p> A filter indicating the status of transactions to return. Options are ALL | COMPLETED | COMMITTED | ABORTED | ACTIVE. The default is <code>ALL</code>.</p>
        max_results: <p>The maximum number of transactions to return in a single call.</p>
        next_token: <p>A continuation token if this is not the first call to retrieve transactions.</p>

    Raises:
        capo_lakeformation.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_lakeformation.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_lakeformation.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_lakeformation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_lakeformation.types.list_transactions_request.ListTransactionsRequest]",
    ) -> OperationResponse[
        "capo_lakeformation.types.list_transactions_response.ListTransactionsResponse"
    ]:
        import capo_lakeformation._operations.aws_lake_formation.list_transactions

        output, http_response = (
            capo_lakeformation._operations.aws_lake_formation.list_transactions.list_transactions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTransactions")
    )
    input_: capo_lakeformation.types.list_transactions_request.ListTransactionsRequest = {}
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id
    if status_filter is not None:
        input_["status_filter"] = status_filter
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output