Skip to content

DeleteBackup

Source: src/AWS/CloudHSMV2/DeleteBackup.ts

Runtime binding for the DeleteBackup operation (IAM action cloudhsm:DeleteBackup).

Marks a CloudHSM backup for deletion — it enters PENDING_DELETION and can still be recovered with RestoreBackup for 7 days. Pair with DescribeBackups to build a backup-pruning job. Provide the implementation with Effect.provide(AWS.CloudHSMV2.DeleteBackupHttp).

const deleteBackup = yield* AWS.CloudHSMV2.DeleteBackup();
const deleted = yield* deleteBackup({ BackupId: backupId });
// deleted.Backup?.BackupState === "PENDING_DELETION"