- 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.
DeleteBackupCommand
Deletes an Amazon FSx backup. After deletion, the backup no longer exists, and its data is gone.
The DeleteBackup
call returns instantly. The backup won't show up in later DescribeBackups
calls.
The data in a deleted backup is also deleted and can't be recovered by any means.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { FSxClient, DeleteBackupCommand } from "@aws-sdk/client-fsx"; // ES Modules import
// const { FSxClient, DeleteBackupCommand } = require("@aws-sdk/client-fsx"); // CommonJS import
const client = new FSxClient(config);
const input = { // DeleteBackupRequest
BackupId: "STRING_VALUE", // required
ClientRequestToken: "STRING_VALUE",
};
const command = new DeleteBackupCommand(input);
const response = await client.send(command);
// { // DeleteBackupResponse
// BackupId: "STRING_VALUE",
// Lifecycle: "AVAILABLE" || "CREATING" || "TRANSFERRING" || "DELETED" || "FAILED" || "PENDING" || "COPYING",
// };
Example Usage
DeleteBackupCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
BackupId Required | string | undefined | The ID of the backup that you want to delete. |
ClientRequestToken | string | undefined | A string of up to 63 ASCII characters that Amazon FSx uses to ensure idempotent deletion. This parameter is automatically filled on your behalf when using the CLI or SDK. |
DeleteBackupCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
BackupId | string | undefined | The ID of the backup that was deleted. |
Lifecycle | BackupLifecycle | undefined | The lifecycle status of the backup. If the |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
BackupBeingCopied | client | You can't delete a backup while it's being copied. |
BackupInProgress | client | Another backup is already under way. Wait for completion before initiating additional backups of this file system. |
BackupNotFound | client | No Amazon FSx backups were found based upon the supplied parameters. |
BackupRestoring | client | You can't delete a backup while it's being used to restore a file system. |
BadRequest | client | A generic error indicating a failure with a client request. |
IncompatibleParameterError | client | The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request. |
InternalServerError | server | A generic error indicating a server-side failure. |
FSxServiceException | Base exception class for all service exceptions from FSx service. |