Attempts to commit the specified transaction. Returns an exception if the transaction was previously aborted. This API action is idempotent if called multiple times for the same transaction.
Parameters:
Raises:
Source code in docs_src/capo_lakeformation/_services/lake_formation.py
| def commit_transaction(
self,
transaction_id: "capo_lakeformation.types.transaction_id_string.TransactionIdString",
*,
config_overrides: Optional[LakeFormationClientConfig] = None,
) -> (
"capo_lakeformation.types.commit_transaction_response.CommitTransactionResponse"
):
"""<p>Attempts to commit the specified transaction. Returns an exception if the transaction was previously aborted. This API action is idempotent if called multiple times for the same transaction.</p>
Args:
transaction_id: <p>The transaction to commit.</p>
Raises:
capo_lakeformation.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Two processes are trying to modify a resource simultaneously.</p>
capo_lakeformation.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist.</p>
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.transaction_canceled_exception.TransactionCanceledException: <p>Contains details about an error related to a transaction that was cancelled.</p>
capo_lakeformation.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_lakeformation.types.commit_transaction_request.CommitTransactionRequest]",
) -> OperationResponse[
"capo_lakeformation.types.commit_transaction_response.CommitTransactionResponse"
]:
import capo_lakeformation._operations.aws_lake_formation.commit_transaction
output, http_response = (
capo_lakeformation._operations.aws_lake_formation.commit_transaction.commit_transaction(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CommitTransaction")
)
input_: capo_lakeformation.types.commit_transaction_request.CommitTransactionRequest = {
"transaction_id": transaction_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|