LakeFormation / Client / delete_objects_on_cancel

delete_objects_on_cancel#

LakeFormation.Client.delete_objects_on_cancel(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.delete_objects_on_cancel(
    CatalogId='string',
    DatabaseName='string',
    TableName='string',
    TransactionId='string',
    Objects=[
        {
            'Uri': 'string',
            'ETag': 'string'
        },
    ]
)
Parameters:
  • CatalogId (string) – The Glue data catalog that contains the governed table. Defaults to the current account ID.

  • DatabaseName (string) –

    [REQUIRED]

    The database that contains the governed table.

  • TableName (string) –

    [REQUIRED]

    The name of the governed table.

  • TransactionId (string) –

    [REQUIRED]

    ID of the transaction that the writes occur in.

  • Objects (list) –

    [REQUIRED]

    A list of VirtualObject structures, which indicates the Amazon S3 objects to be deleted if the transaction cancels.

    • (dict) –

      An object that defines an Amazon S3 object to be deleted if a transaction cancels, provided that VirtualPut was called before writing the object.

      • Uri (string) – [REQUIRED]

        The path to the Amazon S3 object. Must start with s3://

      • ETag (string) –

        The ETag of the Amazon S3 object.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions