- 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 existing backup of a table.
You can call DeleteBackup
at a maximum rate of 10 times per second.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DynamoDBClient, DeleteBackupCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
// const { DynamoDBClient, DeleteBackupCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
const client = new DynamoDBClient(config);
const input = { // DeleteBackupInput
BackupArn: "STRING_VALUE", // required
};
const command = new DeleteBackupCommand(input);
const response = await client.send(command);
// { // DeleteBackupOutput
// BackupDescription: { // BackupDescription
// BackupDetails: { // BackupDetails
// BackupArn: "STRING_VALUE", // required
// BackupName: "STRING_VALUE", // required
// BackupSizeBytes: Number("long"),
// BackupStatus: "CREATING" || "DELETED" || "AVAILABLE", // required
// BackupType: "USER" || "SYSTEM" || "AWS_BACKUP", // required
// BackupCreationDateTime: new Date("TIMESTAMP"), // required
// BackupExpiryDateTime: new Date("TIMESTAMP"),
// },
// SourceTableDetails: { // SourceTableDetails
// TableName: "STRING_VALUE", // required
// TableId: "STRING_VALUE", // required
// TableArn: "STRING_VALUE",
// TableSizeBytes: Number("long"),
// KeySchema: [ // KeySchema // required
// { // KeySchemaElement
// AttributeName: "STRING_VALUE", // required
// KeyType: "HASH" || "RANGE", // required
// },
// ],
// TableCreationDateTime: new Date("TIMESTAMP"), // required
// ProvisionedThroughput: { // ProvisionedThroughput
// ReadCapacityUnits: Number("long"), // required
// WriteCapacityUnits: Number("long"), // required
// },
// OnDemandThroughput: { // OnDemandThroughput
// MaxReadRequestUnits: Number("long"),
// MaxWriteRequestUnits: Number("long"),
// },
// ItemCount: Number("long"),
// BillingMode: "PROVISIONED" || "PAY_PER_REQUEST",
// },
// SourceTableFeatureDetails: { // SourceTableFeatureDetails
// LocalSecondaryIndexes: [ // LocalSecondaryIndexes
// { // LocalSecondaryIndexInfo
// IndexName: "STRING_VALUE",
// KeySchema: [
// {
// AttributeName: "STRING_VALUE", // required
// KeyType: "HASH" || "RANGE", // required
// },
// ],
// Projection: { // Projection
// ProjectionType: "ALL" || "KEYS_ONLY" || "INCLUDE",
// NonKeyAttributes: [ // NonKeyAttributeNameList
// "STRING_VALUE",
// ],
// },
// },
// ],
// GlobalSecondaryIndexes: [ // GlobalSecondaryIndexes
// { // GlobalSecondaryIndexInfo
// IndexName: "STRING_VALUE",
// KeySchema: [
// {
// AttributeName: "STRING_VALUE", // required
// KeyType: "HASH" || "RANGE", // required
// },
// ],
// Projection: {
// ProjectionType: "ALL" || "KEYS_ONLY" || "INCLUDE",
// NonKeyAttributes: [
// "STRING_VALUE",
// ],
// },
// ProvisionedThroughput: {
// ReadCapacityUnits: Number("long"), // required
// WriteCapacityUnits: Number("long"), // required
// },
// OnDemandThroughput: {
// MaxReadRequestUnits: Number("long"),
// MaxWriteRequestUnits: Number("long"),
// },
// },
// ],
// StreamDescription: { // StreamSpecification
// StreamEnabled: true || false, // required
// StreamViewType: "NEW_IMAGE" || "OLD_IMAGE" || "NEW_AND_OLD_IMAGES" || "KEYS_ONLY",
// },
// TimeToLiveDescription: { // TimeToLiveDescription
// TimeToLiveStatus: "ENABLING" || "DISABLING" || "ENABLED" || "DISABLED",
// AttributeName: "STRING_VALUE",
// },
// SSEDescription: { // SSEDescription
// Status: "ENABLING" || "ENABLED" || "DISABLING" || "DISABLED" || "UPDATING",
// SSEType: "AES256" || "KMS",
// KMSMasterKeyArn: "STRING_VALUE",
// InaccessibleEncryptionDateTime: new Date("TIMESTAMP"),
// },
// },
// },
// };
DeleteBackupCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
BackupArn Required | string | undefined | The ARN associated with the backup. |
DeleteBackupCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
BackupDescription | BackupDescription | undefined | Contains the description of the backup created for the table. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
BackupInUseException | client | There is another ongoing conflicting backup control plane operation on the table. The backup is either being created, deleted or restored to a table. |
BackupNotFoundException | client | Backup not found for the given BackupARN. |
InternalServerError | server | An error occurred on the server side. |
InvalidEndpointException | client | |
LimitExceededException | client | There is no limit to the number of daily on-demand backups that can be taken. For most purposes, up to 500 simultaneous table operations are allowed per account. These operations include When you are creating a table with one or more secondary indexes, you can have up to 250 such requests running at a time. However, if the table or index specifications are complex, then DynamoDB might temporarily reduce the number of concurrent operations. When importing into DynamoDB, up to 50 simultaneous import table operations are allowed per account. There is a soft account quota of 2,500 tables. GetRecords was called with a value of more than 1000 for the limit request parameter. More than 2 processes are reading from the same streams shard at the same time. Exceeding this limit may result in request throttling. |
DynamoDBServiceException | Base exception class for all service exceptions from DynamoDB service. |