Skip to content

update_continuous_backups async

update_continuous_backups(
    table_name: TableArn,
    point_in_time_recovery_specification: PointInTimeRecoverySpecification,
    *,
    config_overrides: Optional[AsyncDynamoDBClientConfig] = None,
) -> UpdateContinuousBackupsOutput

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 RecoveryPeriodInDays to any value between 1 and 35 days.

Parameters:

  • table_name (TableArn) –

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

  • point_in_time_recovery_specification (PointInTimeRecoverySpecification) –

    Represents the settings used to enable point in time recovery.

Raises:

Source code in docs_src/capo_dynamodb/_services/async_dynamo_db.py
async def update_continuous_backups(
    self,
    table_name: "capo_dynamodb.types.table_arn.TableArn",
    point_in_time_recovery_specification: "capo_dynamodb.types.point_in_time_recovery_specification.PointInTimeRecoverySpecification",
    *,
    config_overrides: Optional[AsyncDynamoDBClientConfig] = None,
) -> "capo_dynamodb.types.update_continuous_backups_output.UpdateContinuousBackupsOutput":
    """<p> <code>UpdateContinuousBackups</code> enables or disables point in time recovery for the specified table. A successful <code>UpdateContinuousBackups</code> call returns the current <code>ContinuousBackupsDescription</code>. Continuous backups are <code>ENABLED</code> on all tables at table creation. If point in time recovery is enabled, <code>PointInTimeRecoveryStatus</code> will be set to ENABLED.</p> <p> Once continuous backups and point in time recovery are enabled, you can restore to any point in time within <code>EarliestRestorableDateTime</code> and <code>LatestRestorableDateTime</code>. </p> <p> <code>LatestRestorableDateTime</code> 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 <code>RecoveryPeriodInDays</code> to any value between 1 and 35 days.</p>

    Args:
        table_name: <p>The name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
        point_in_time_recovery_specification: <p>Represents the settings used to enable point in time recovery.</p>

    Raises:
        capo_dynamodb.errors.continuous_backups_unavailable_exception.ContinuousBackupsUnavailableException: <p>Backups have not yet been enabled for this table.</p>
        capo_dynamodb.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_dynamodb.errors.invalid_endpoint_exception.InvalidEndpointException
        capo_dynamodb.errors.table_not_found_exception.TableNotFoundException: <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account or the subscriber is operating in the wrong Amazon Web Services Region.</p>
        capo_dynamodb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_dynamodb.types.update_continuous_backups_input.UpdateContinuousBackupsInput]",
    ) -> AsyncOperationResponse[
        "capo_dynamodb.types.update_continuous_backups_output.UpdateContinuousBackupsOutput"
    ]:
        import capo_dynamodb._operations.dynamo_db_20120810.update_continuous_backups

        (
            output,
            http_response,
        ) = await capo_dynamodb._operations.dynamo_db_20120810.update_continuous_backups.async_update_continuous_backups(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateContinuousBackups")
    )
    input_: capo_dynamodb.types.update_continuous_backups_input.UpdateContinuousBackupsInput = {
        "table_name": table_name,
        "point_in_time_recovery_specification": point_in_time_recovery_specification,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output