delete_objects_on_cancel
async
¶
delete_objects_on_cancel(
database_name: NameString,
table_name: NameString,
transaction_id: TransactionIdString,
objects: VirtualObjectList,
*,
config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
catalog_id: Optional[CatalogIdString] = None,
) -> DeleteObjectsOnCancelResponse
For a specific governed table, provides a list of Amazon S3 objects that will be written during the current transaction and that can be automatically deleted if the transaction is canceled. Without this call, no Amazon S3 objects are automatically deleted when a transaction cancels.
The Glue ETL library function write_dynamic_frame.from_catalog() includes an option to automatically call DeleteObjectsOnCancel before writes. For more information, see Rolling Back Amazon S3 Writes.
Parameters:
-
catalog_id(Optional[CatalogIdString], default:None) –The Glue data catalog that contains the governed table. Defaults to the current account ID.
-
database_name(NameString) –The database that contains the governed table.
-
table_name(NameString) –The name of the governed table.
-
transaction_id(TransactionIdString) –ID of the transaction that the writes occur in.
-
objects(VirtualObjectList) –A list of VirtualObject structures, which indicates the Amazon S3 objects to be deleted if the transaction cancels.
Raises:
-
ConcurrentModificationException–Two processes are trying to modify a resource simultaneously.
-
EntityNotFoundException–A specified entity does not exist.
-
InternalServiceException–An internal service error occurred.
-
InvalidInputException–The input provided was not valid.
-
OperationTimeoutException–The operation timed out.
-
ResourceNotReadyException–Contains details about an error related to a resource which is not ready for a transaction.
-
TransactionCanceledException–Contains details about an error related to a transaction that was cancelled.
-
TransactionCommittedException–Contains details about an error where the specified transaction has already been committed and cannot be used for
UpdateTableObjects. -
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 | |