Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

begin_transaction

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.

DDL statements inside a transaction cause an implicit commit. We recommend that you run each 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

  • RDSDataService.Client.exceptions.AccessDeniedException
  • RDSDataService.Client.exceptions.BadRequestException
  • RDSDataService.Client.exceptions.StatementTimeoutException
  • RDSDataService.Client.exceptions.InternalServerErrorException
  • RDSDataService.Client.exceptions.ForbiddenException
  • RDSDataService.Client.exceptions.ServiceUnavailableError