Skip to main content

transactions

Creates, updates, deletes, gets or lists a transactions resource.

Overview​

Nametransactions
TypeResource
Idaws.rds_data.transactions

Fields​

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
begin_transactionexecregion, resourceArn, secretArnStarts a SQL transaction. A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours. A transaction times out if no calls use its transaction ID in three minutes. If a transaction times out before it's committed, it's rolled back automatically. For Aurora MySQL, DDL statements inside a transaction cause an implicit commit. We recommend that you run each MySQL DDL statement in a separate ExecuteStatement call with continueAfterTimeout enabled.
commit_transactionexecregion, resourceArn, secretArn, transactionIdEnds a SQL transaction started with the BeginTransaction operation and commits the changes.
rollback_transactionexecregion, resourceArn, secretArn, transactionIdPerforms a rollback of a transaction. Rolling back a transaction cancels its changes.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

Lifecycle Methods​

Starts a SQL transaction. A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours. A transaction times out if no calls use its transaction ID in three minutes. If a transaction times out before it's committed, it's rolled back automatically. For Aurora MySQL, DDL statements inside a transaction cause an implicit commit. We recommend that you run each MySQL DDL statement in a separate ExecuteStatement call with continueAfterTimeout enabled.

EXEC aws.rds_data.transactions.begin_transaction
@region='{{ region }}' --required
@@json=
'{
"resourceArn": "{{ resourceArn }}",
"secretArn": "{{ secretArn }}",
"database": "{{ database }}",
"schema": "{{ schema }}"
}'
;