RDSDataService / Client / begin_transaction

begin_transaction#

RDSDataService.Client.begin_transaction(**kwargs)#

Starts a SQL transaction.

Note

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.

See also: AWS API Documentation

Request Syntax

response = client.begin_transaction(
    resourceArn='string',
    secretArn='string',
    database='string',
    schema='string'
)
Parameters:
  • resourceArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.

  • secretArn (string) –

    [REQUIRED]

    The name or ARN of the secret that enables access to the DB cluster.

  • database (string) – The name of the database.

  • schema (string) – The name of the database schema.

Return type:

dict

Returns:

Response Syntax

{
    'transactionId': 'string'
}

Response Structure

  • (dict) –

    The response elements represent the output of a request to start a SQL transaction.

    • transactionId (string) –

      The transaction ID of the transaction started by the call.

Exceptions