rollbackTransaction method

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

Performs a rollback of a transaction. Rolling back a transaction cancels its 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 roll back.

Implementation

Future<RollbackTransactionResponse> rollbackTransaction({
  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: '/RollbackTransaction',
    exceptionFnMap: _exceptionFns,
  );
  return RollbackTransactionResponse.fromJson(response);
}