commitTransaction method

Future<CommitTransactionResponse> commitTransaction({
  1. required String resourceArn,
  2. required String secretArn,
  3. required String transactionId,
})

Ends a SQL transaction started with the BeginTransaction operation and commits the changes.

May throw BadRequestException. May throw StatementTimeoutException. May throw InternalServerErrorException. May throw ForbiddenException. May throw ServiceUnavailableError. May throw NotFoundException.

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

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

Parameter transactionId : The identifier of the transaction to end and commit.

Implementation

Future<CommitTransactionResponse> commitTransaction({
  required String resourceArn,
  required String secretArn,
  required String transactionId,
}) async {
  ArgumentError.checkNotNull(resourceArn, 'resourceArn');
  _s.validateStringLength(
    'resourceArn',
    resourceArn,
    11,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(secretArn, 'secretArn');
  _s.validateStringLength(
    'secretArn',
    secretArn,
    11,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(transactionId, 'transactionId');
  _s.validateStringLength(
    'transactionId',
    transactionId,
    0,
    192,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'resourceArn': resourceArn,
    'secretArn': secretArn,
    'transactionId': transactionId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/CommitTransaction',
    exceptionFnMap: _exceptionFns,
  );
  return CommitTransactionResponse.fromJson(response);
}