deleteLedger method

Future<void> deleteLedger({
  1. required String name,
})

Deletes a ledger and all of its contents. This action is irreversible.

If deletion protection is enabled, you must first disable it before you can delete the ledger using the QLDB API or the AWS Command Line Interface (AWS CLI). You can disable it by calling the UpdateLedger operation to set the flag to false. The QLDB console disables deletion protection for you when you use it to delete a ledger.

May throw InvalidParameterException. May throw ResourceNotFoundException. May throw ResourceInUseException. May throw ResourcePreconditionNotMetException.

Parameter name : The name of the ledger that you want to delete.

Implementation

Future<void> deleteLedger({
  required String name,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    32,
    isRequired: true,
  );
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/ledgers/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
}