- 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.
DeleteDBClusterSnapshotCommand
Deletes a cluster snapshot. If the snapshot is being copied, the copy operation is terminated.
The cluster snapshot must be in the available
state to be deleted.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DocDBClient, DeleteDBClusterSnapshotCommand } from "@aws-sdk/client-docdb"; // ES Modules import
// const { DocDBClient, DeleteDBClusterSnapshotCommand } = require("@aws-sdk/client-docdb"); // CommonJS import
const client = new DocDBClient(config);
const input = { // DeleteDBClusterSnapshotMessage
DBClusterSnapshotIdentifier: "STRING_VALUE", // required
};
const command = new DeleteDBClusterSnapshotCommand(input);
const response = await client.send(command);
// { // DeleteDBClusterSnapshotResult
// DBClusterSnapshot: { // DBClusterSnapshot
// AvailabilityZones: [ // AvailabilityZones
// "STRING_VALUE",
// ],
// DBClusterSnapshotIdentifier: "STRING_VALUE",
// DBClusterIdentifier: "STRING_VALUE",
// SnapshotCreateTime: new Date("TIMESTAMP"),
// Engine: "STRING_VALUE",
// Status: "STRING_VALUE",
// Port: Number("int"),
// VpcId: "STRING_VALUE",
// ClusterCreateTime: new Date("TIMESTAMP"),
// MasterUsername: "STRING_VALUE",
// EngineVersion: "STRING_VALUE",
// SnapshotType: "STRING_VALUE",
// PercentProgress: Number("int"),
// StorageEncrypted: true || false,
// KmsKeyId: "STRING_VALUE",
// DBClusterSnapshotArn: "STRING_VALUE",
// SourceDBClusterSnapshotArn: "STRING_VALUE",
// StorageType: "STRING_VALUE",
// },
// };
DeleteDBClusterSnapshotCommand Input
See DeleteDBClusterSnapshotCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DBClusterSnapshotIdentifier Required | string | undefined | The identifier of the cluster snapshot to delete. Constraints: Must be the name of an existing cluster snapshot in the |
DeleteDBClusterSnapshotCommand Output
See DeleteDBClusterSnapshotCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
DBClusterSnapshot | DBClusterSnapshot | undefined | Detailed information about a cluster snapshot. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
DBClusterSnapshotNotFoundFault | client | |
InvalidDBClusterSnapshotStateFault | client | The provided value isn't a valid cluster snapshot state. |
DocDBServiceException | Base exception class for all service exceptions from DocDB service. |