ListTransactionsCommand

Returns metadata about transactions and their status. To prevent the response from growing indefinitely, only uncommitted transactions and those available for time-travel queries are returned.

This operation can help you identify uncommitted transactions or to get information about transactions.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { LakeFormationClient, ListTransactionsCommand } from "@aws-sdk/client-lakeformation"; // ES Modules import
// const { LakeFormationClient, ListTransactionsCommand } = require("@aws-sdk/client-lakeformation"); // CommonJS import
const client = new LakeFormationClient(config);
const input = { // ListTransactionsRequest
  CatalogId: "STRING_VALUE",
  StatusFilter: "ALL" || "COMPLETED" || "ACTIVE" || "COMMITTED" || "ABORTED",
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new ListTransactionsCommand(input);
const response = await client.send(command);
// { // ListTransactionsResponse
//   Transactions: [ // TransactionDescriptionList
//     { // TransactionDescription
//       TransactionId: "STRING_VALUE",
//       TransactionStatus: "ACTIVE" || "COMMITTED" || "ABORTED" || "COMMIT_IN_PROGRESS",
//       TransactionStartTime: new Date("TIMESTAMP"),
//       TransactionEndTime: new Date("TIMESTAMP"),
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListTransactionsCommand Input

See ListTransactionsCommandInput for more details

Parameter
Type
Description
CatalogId
string | undefined

The catalog for which to list transactions. Defaults to the account ID of the caller.

MaxResults
number | undefined

The maximum number of transactions to return in a single call.

NextToken
string | undefined

A continuation token if this is not the first call to retrieve transactions.

StatusFilter
TransactionStatusFilter | undefined

A filter indicating the status of transactions to return. Options are ALL | COMPLETED | COMMITTED | ABORTED | ACTIVE. The default is ALL.

ListTransactionsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
NextToken
string | undefined

A continuation token indicating whether additional data is available.

Transactions
TransactionDescription[] | undefined

A list of transactions. The record for each transaction is a TransactionDescription object.

Throws

Name
Fault
Details
InternalServiceException
server

An internal service error occurred.

InvalidInputException
client

The input provided was not valid.

OperationTimeoutException
client

The operation timed out.

LakeFormationServiceException
Base exception class for all service exceptions from LakeFormation service.