- 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.
ListBackupsCommand
List DynamoDB backups that are associated with an Amazon Web Services account and weren't made with Amazon Web Services Backup. To list these backups for a given table, specify TableName
. ListBackups
returns a paginated list of results with at most 1 MB worth of items in a page. You can also specify a maximum number of entries to be returned in a page.
In the request, start time is inclusive, but end time is exclusive. Note that these boundaries are for the time at which the original backup was requested.
You can call ListBackups
a maximum of five times per second.
If you want to retrieve the complete list of backups made with Amazon Web Services Backup, use the Amazon Web Services Backup list API.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DynamoDBClient, ListBackupsCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
// const { DynamoDBClient, ListBackupsCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
const client = new DynamoDBClient(config);
const input = { // ListBackupsInput
TableName: "STRING_VALUE",
Limit: Number("int"),
TimeRangeLowerBound: new Date("TIMESTAMP"),
TimeRangeUpperBound: new Date("TIMESTAMP"),
ExclusiveStartBackupArn: "STRING_VALUE",
BackupType: "USER" || "SYSTEM" || "AWS_BACKUP" || "ALL",
};
const command = new ListBackupsCommand(input);
const response = await client.send(command);
// { // ListBackupsOutput
// BackupSummaries: [ // BackupSummaries
// { // BackupSummary
// TableName: "STRING_VALUE",
// TableId: "STRING_VALUE",
// TableArn: "STRING_VALUE",
// BackupArn: "STRING_VALUE",
// BackupName: "STRING_VALUE",
// BackupCreationDateTime: new Date("TIMESTAMP"),
// BackupExpiryDateTime: new Date("TIMESTAMP"),
// BackupStatus: "CREATING" || "DELETED" || "AVAILABLE",
// BackupType: "USER" || "SYSTEM" || "AWS_BACKUP",
// BackupSizeBytes: Number("long"),
// },
// ],
// LastEvaluatedBackupArn: "STRING_VALUE",
// };
ListBackupsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
BackupType | BackupTypeFilter | undefined | The backups from the table specified by Where
|
ExclusiveStartBackupArn | string | undefined | |
Limit | number | undefined | Maximum number of backups to return at once. |
TableName | string | undefined | Lists the backups from the table specified in |
TimeRangeLowerBound | Date | undefined | Only backups created after this time are listed. |
TimeRangeUpperBound | Date | undefined | Only backups created before this time are listed. |
ListBackupsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
BackupSummaries | BackupSummary[] | undefined | List of |
LastEvaluatedBackupArn | string | undefined | The ARN of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the If If |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerError | server | An error occurred on the server side. |
InvalidEndpointException | client | |
DynamoDBServiceException | Base exception class for all service exceptions from DynamoDB service. |