Amazon DynamoDB

2025/01/07 - Amazon DynamoDB - 2 updated api methods

Changes  This release makes Amazon DynamoDB point-in-time-recovery (PITR) to be configurable. You can set PITR recovery period for each table individually to between 1 and 35 days.

DescribeContinuousBackups (updated) Link ¶
Changes (response)
{'ContinuousBackupsDescription': {'PointInTimeRecoveryDescription': {'RecoveryPeriodInDays': 'integer'}}}

Checks the status of continuous backups and point in time recovery on the specified table. Continuous backups are ENABLED on all tables at table creation. If point in time recovery is enabled, PointInTimeRecoveryStatus will be set to ENABLED.

After continuous backups and point in time recovery are enabled, you can restore to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime.

LatestRestorableDateTime is typically 5 minutes before the current time. You can restore your table to any point in time in the last 35 days. You can set the recovery period to any value between 1 and 35 days.

You can call DescribeContinuousBackups at a maximum rate of 10 times per second.

See also: AWS API Documentation

Request Syntax

client.describe_continuous_backups(
    TableName='string'
)
type TableName:

string

param TableName:

[REQUIRED]

Name of the table for which the customer wants to check the continuous backups and point in time recovery settings.

You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

rtype:

dict

returns:

Response Syntax

{
    'ContinuousBackupsDescription': {
        'ContinuousBackupsStatus': 'ENABLED'|'DISABLED',
        'PointInTimeRecoveryDescription': {
            'PointInTimeRecoveryStatus': 'ENABLED'|'DISABLED',
            'RecoveryPeriodInDays': 123,
            'EarliestRestorableDateTime': datetime(2015, 1, 1),
            'LatestRestorableDateTime': datetime(2015, 1, 1)
        }
    }
}

Response Structure

  • (dict) --

    • ContinuousBackupsDescription (dict) --

      Represents the continuous backups and point in time recovery settings on the table.

      • ContinuousBackupsStatus (string) --

        ContinuousBackupsStatus can be one of the following states: ENABLED, DISABLED

      • PointInTimeRecoveryDescription (dict) --

        The description of the point in time recovery settings applied to the table.

        • PointInTimeRecoveryStatus (string) --

          The current state of point in time recovery:

          • ENABLED - Point in time recovery is enabled.

          • DISABLED - Point in time recovery is disabled.

        • RecoveryPeriodInDays (integer) --

          The number of preceding days for which continuous backups are taken and maintained. Your table data is only recoverable to any point-in-time from within the configured recovery period. This parameter is optional. If no value is provided, the value will default to 35.

        • EarliestRestorableDateTime (datetime) --

          Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.

        • LatestRestorableDateTime (datetime) --

          LatestRestorableDateTime is typically 5 minutes before the current time.

UpdateContinuousBackups (updated) Link ¶
Changes (request, response)
Request
{'PointInTimeRecoverySpecification': {'RecoveryPeriodInDays': 'integer'}}
Response
{'ContinuousBackupsDescription': {'PointInTimeRecoveryDescription': {'RecoveryPeriodInDays': 'integer'}}}

UpdateContinuousBackups enables or disables point in time recovery for the specified table. A successful UpdateContinuousBackups call returns the current ContinuousBackupsDescription. Continuous backups are ENABLED on all tables at table creation. If point in time recovery is enabled, PointInTimeRecoveryStatus will be set to ENABLED.

Once continuous backups and point in time recovery are enabled, you can restore to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime.

LatestRestorableDateTime is typically 5 minutes before the current time. You can restore your table to any point in time in the last 35 days. You can set the recovery period to any value between 1 and 35 days.

See also: AWS API Documentation

Request Syntax

client.update_continuous_backups(
    TableName='string',
    PointInTimeRecoverySpecification={
        'PointInTimeRecoveryEnabled': True|False,
        'RecoveryPeriodInDays': 123
    }
)
type TableName:

string

param TableName:

[REQUIRED]

The name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

type PointInTimeRecoverySpecification:

dict

param PointInTimeRecoverySpecification:

[REQUIRED]

Represents the settings used to enable point in time recovery.

  • PointInTimeRecoveryEnabled (boolean) -- [REQUIRED]

    Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.

  • RecoveryPeriodInDays (integer) --

    The number of preceding days for which continuous backups are taken and maintained. Your table data is only recoverable to any point-in-time from within the configured recovery period. This parameter is optional. If no value is provided, the value will default to 35.

rtype:

dict

returns:

Response Syntax

{
    'ContinuousBackupsDescription': {
        'ContinuousBackupsStatus': 'ENABLED'|'DISABLED',
        'PointInTimeRecoveryDescription': {
            'PointInTimeRecoveryStatus': 'ENABLED'|'DISABLED',
            'RecoveryPeriodInDays': 123,
            'EarliestRestorableDateTime': datetime(2015, 1, 1),
            'LatestRestorableDateTime': datetime(2015, 1, 1)
        }
    }
}

Response Structure

  • (dict) --

    • ContinuousBackupsDescription (dict) --

      Represents the continuous backups and point in time recovery settings on the table.

      • ContinuousBackupsStatus (string) --

        ContinuousBackupsStatus can be one of the following states: ENABLED, DISABLED

      • PointInTimeRecoveryDescription (dict) --

        The description of the point in time recovery settings applied to the table.

        • PointInTimeRecoveryStatus (string) --

          The current state of point in time recovery:

          • ENABLED - Point in time recovery is enabled.

          • DISABLED - Point in time recovery is disabled.

        • RecoveryPeriodInDays (integer) --

          The number of preceding days for which continuous backups are taken and maintained. Your table data is only recoverable to any point-in-time from within the configured recovery period. This parameter is optional. If no value is provided, the value will default to 35.

        • EarliestRestorableDateTime (datetime) --

          Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.

        • LatestRestorableDateTime (datetime) --

          LatestRestorableDateTime is typically 5 minutes before the current time.