delete_objects_on_cancel
¶
delete_objects_on_cancel(
database_name: NameString,
table_name: NameString,
transaction_id: TransactionIdString,
objects: VirtualObjectList,
*,
config_overrides: Optional[LakeFormationClientConfig] = 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/lake_formation.py
1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 | |