- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteObjectsOnCancelCommand
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 .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { LakeFormationClient, DeleteObjectsOnCancelCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import
// const { LakeFormationClient, DeleteObjectsOnCancelCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import
const client = new LakeFormationClient(config);
const input = { // DeleteObjectsOnCancelRequest
CatalogId: "STRING_VALUE",
DatabaseName: "STRING_VALUE", // required
TableName: "STRING_VALUE", // required
TransactionId: "STRING_VALUE", // required
Objects: [ // VirtualObjectList // required
{ // VirtualObject
Uri: "STRING_VALUE", // required
ETag: "STRING_VALUE",
},
],
};
const command = new DeleteObjectsOnCancelCommand(input);
const response = await client.send(command);
// {};
DeleteObjectsOnCancelCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DatabaseName Required | string | undefined | The database that contains the governed table. |
Objects Required | VirtualObject[] | undefined | A list of VirtualObject structures, which indicates the Amazon S3 objects to be deleted if the transaction cancels. |
TableName Required | string | undefined | The name of the governed table. |
TransactionId Required | string | undefined | ID of the transaction that the writes occur in. |
CatalogId | string | undefined | The Glue data catalog that contains the governed table. Defaults to the current account ID. |
DeleteObjectsOnCancelCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ConcurrentModificationException | client | Two processes are trying to modify a resource simultaneously. |
EntityNotFoundException | client | A specified entity does not exist. |
InternalServiceException | server | An internal service error occurred. |
InvalidInputException | client | The input provided was not valid. |
OperationTimeoutException | client | The operation timed out. |
ResourceNotReadyException | client | Contains details about an error related to a resource which is not ready for a transaction. |
TransactionCanceledException | client | Contains details about an error related to a transaction that was cancelled. |
TransactionCommittedException | client | Contains details about an error where the specified transaction has already been committed and cannot be used for |
LakeFormationServiceException | Base exception class for all service exceptions from LakeFormation service. |