backups
Creates, updates, deletes, gets or lists a backups resource.
Overview
| Name | backups |
| Type | Resource |
| Id | aws.dynamodb.backups |
Fields
The following fields are returned by SELECT queries:
- describe_backup
- list_backups
| Name | Datatype | Description |
|---|---|---|
backup_details | object | Contains the details of the backup created for the table. |
source_table_details | object | Contains the details of the table when the backup was created. |
source_table_feature_details | object | Contains the details of the features enabled on the table when the backup was created. For example, LSIs, GSIs, streams, TTL. |
| Name | Datatype | Description |
|---|---|---|
backup_arn | string | ARN associated with the backup. |
backup_creation_date_time | string (date-time) | Time at which the backup was created. |
backup_expiry_date_time | string (date-time) | Time at which the automatic on-demand backup created by DynamoDB will expire. This SYSTEM on-demand backup expires automatically 35 days after its creation. |
backup_name | string | Name of the specified backup. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
backup_size_bytes | integer (int64) | Size of the backup in bytes. |
backup_status | string | Backup can be in one of the following states: CREATING, ACTIVE, DELETED. (CREATING, DELETED, AVAILABLE) |
backup_type | string | BackupType: USER - You create and manage these using the on-demand backup feature. SYSTEM - If you delete a table with point-in-time recovery enabled, a SYSTEM backup is automatically created and is retained for 35 days (at no additional cost). System backups allow you to restore the deleted table to the state it was in just before the point of deletion. AWS_BACKUP - On-demand backup created by you from Backup service. (USER, SYSTEM, AWS_BACKUP) |
table_arn | string | ARN associated with the table. |
table_id | string | Unique identifier for the table. (pattern: <code>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}</code>) |
table_name | string | Name of the table. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_backup | select | region | Describes an existing backup of a table. You can call DescribeBackup at a maximum rate of 10 times per second. | |
list_backups | select | region | 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. | |
create_backup | insert | region, TableName, BackupName | Creates a backup for an existing table. Each time you create an on-demand backup, the entire table data is backed up. There is no limit to the number of on-demand backups that can be taken. When you create an on-demand backup, a time marker of the request is cataloged, and the backup is created asynchronously, by applying all changes until the time of the request to the last full table snapshot. Backup requests are processed instantaneously and become available for restore within minutes. You can call CreateBackup at a maximum rate of 50 times per second. All backups in DynamoDB work without consuming any provisioned throughput on the table. If you submit a backup request on 2018-12-14 at 14:25:00, the backup is guaranteed to contain all data committed to the table up to 14:24:00, and data committed after 14:26:00 will not be. The backup might contain data modifications made between 14:24:00 and 14:26:00. On-demand backup does not support causal consistency. Along with data, the following are also included on the backups: Global secondary indexes (GSIs) Local secondary indexes (LSIs) Streams Provisioned read and write capacity | |
delete_backup | delete | region | Deletes an existing backup of a table. You can call DeleteBackup at a maximum rate of 10 times per second. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_backup
- list_backups
Describes an existing backup of a table. You can call DescribeBackup at a maximum rate of 10 times per second.
SELECT
backup_details,
source_table_details,
source_table_feature_details
FROM aws.dynamodb.backups
WHERE region = '{{ region }}' -- required
;
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.
SELECT
backup_arn,
backup_creation_date_time,
backup_expiry_date_time,
backup_name,
backup_size_bytes,
backup_status,
backup_type,
table_arn,
table_id,
table_name
FROM aws.dynamodb.backups
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_backup
- Manifest
Creates a backup for an existing table. Each time you create an on-demand backup, the entire table data is backed up. There is no limit to the number of on-demand backups that can be taken. When you create an on-demand backup, a time marker of the request is cataloged, and the backup is created asynchronously, by applying all changes until the time of the request to the last full table snapshot. Backup requests are processed instantaneously and become available for restore within minutes. You can call CreateBackup at a maximum rate of 50 times per second. All backups in DynamoDB work without consuming any provisioned throughput on the table. If you submit a backup request on 2018-12-14 at 14:25:00, the backup is guaranteed to contain all data committed to the table up to 14:24:00, and data committed after 14:26:00 will not be. The backup might contain data modifications made between 14:24:00 and 14:26:00. On-demand backup does not support causal consistency. Along with data, the following are also included on the backups: Global secondary indexes (GSIs) Local secondary indexes (LSIs) Streams Provisioned read and write capacity
INSERT INTO aws.dynamodb.backups (
TableName,
BackupName,
region
)
SELECT
'{{ TableName }}' /* required */,
'{{ BackupName }}' /* required */,
'{{ region }}'
RETURNING
backup_details
;
# Description fields are for documentation purposes
- name: backups
props:
- name: region
value: "{{ region }}"
description: Required parameter for the backups resource.
- name: TableName
value: "{{ TableName }}"
description: |
The name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
- name: BackupName
value: "{{ BackupName }}"
description: |
Specified name for the backup.
DELETE examples
- delete_backup
Deletes an existing backup of a table. You can call DeleteBackup at a maximum rate of 10 times per second.
DELETE FROM aws.dynamodb.backups
WHERE region = '{{ region }}' --required
;