- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteLedgerCommand
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. You can disable it by calling the UpdateLedger
operation to set this parameter to false
.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { QLDBClient, DeleteLedgerCommand } from "@aws-sdk/client-qldb"; // ES Modules import
// const { QLDBClient, DeleteLedgerCommand } = require("@aws-sdk/client-qldb"); // CommonJS import
const client = new QLDBClient(config);
const input = { // DeleteLedgerRequest
Name: "STRING_VALUE", // required
};
const command = new DeleteLedgerCommand(input);
const response = await client.send(command);
// {};
DeleteLedgerCommand Input
See DeleteLedgerCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Name Required | string | undefined | The name of the ledger that you want to delete. |
DeleteLedgerCommand Output
See DeleteLedgerCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidParameterException | client | One or more parameters in the request aren't valid. |
ResourceInUseException | client | The specified resource can't be modified at this time. |
ResourceNotFoundException | client | The specified resource doesn't exist. |
ResourcePreconditionNotMetException | client | The operation failed because a condition wasn't satisfied in advance. |
QLDBServiceException | Base exception class for all service exceptions from QLDB service. |