- 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.
RollbackTransactionCommand
Performs a rollback of a transaction. Rolling back a transaction cancels its changes.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { RDSDataClient, RollbackTransactionCommand } from "@aws-sdk/client-rds-data"; // ES Modules import
// const { RDSDataClient, RollbackTransactionCommand } = require("@aws-sdk/client-rds-data"); // CommonJS import
const client = new RDSDataClient(config);
const input = { // RollbackTransactionRequest
resourceArn: "STRING_VALUE", // required
secretArn: "STRING_VALUE", // required
transactionId: "STRING_VALUE", // required
};
const command = new RollbackTransactionCommand(input);
const response = await client.send(command);
// { // RollbackTransactionResponse
// transactionStatus: "STRING_VALUE",
// };
RollbackTransactionCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
resourceArn Required | string | undefined | The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster. |
secretArn Required | string | undefined | The name or ARN of the secret that enables access to the DB cluster. |
transactionId Required | string | undefined | The identifier of the transaction to roll back. |
RollbackTransactionCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
transactionStatus | string | undefined | The status of the rollback operation. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You don't have sufficient access to perform this action. |
BadRequestException | client | There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) |
DatabaseErrorException | client | There was an error in processing the SQL statement. |
DatabaseNotFoundException | client | The DB cluster doesn't have a DB instance. |
DatabaseUnavailableException | server | The writer instance in the DB cluster isn't available. |
ForbiddenException | client | There are insufficient privileges to make the call. |
HttpEndpointNotEnabledException | client | The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. |
InternalServerErrorException | server | An internal error occurred. |
InvalidResourceStateException | client | The resource is in an invalid state. |
InvalidSecretException | client | The Secrets Manager secret used with the request isn't valid. |
NotFoundException | client | The |
SecretsErrorException | client | There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:
|
ServiceUnavailableError | server | The service specified by the |
StatementTimeoutException | client | The execution of the SQL statement timed out. |
TransactionNotFoundException | client | The transaction ID wasn't found. |
RDSDataServiceException | Base exception class for all service exceptions from RDSData service. |