Skip to content
v2.277.0

PointInTimeRecoverySpecification Struct ​

Reference to PointInTimeRecovey Specification for continuous backups.

Example ​

ts
const table = new dynamodb.TableV2(this, 'Table', {
  partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
  contributorInsightsSpecification: {
    enabled: true,
  },
  tableClass: dynamodb.TableClass.STANDARD_INFREQUENT_ACCESS,
  pointInTimeRecoverySpecification: {
    pointInTimeRecoveryEnabled: true,
  },
});
python
table = dynamodb.TableV2(self, "Table",
    partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
    contributor_insights_specification=dynamodb.ContributorInsightsSpecification(
        enabled=True
    ),
    table_class=dynamodb.TableClass.STANDARD_INFREQUENT_ACCESS,
    point_in_time_recovery_specification=dynamodb.PointInTimeRecoverySpecification(
        point_in_time_recovery_enabled=True
    )
)
java
TableV2 table = TableV2.Builder.create(this, "Table")
        .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
        .contributorInsightsSpecification(ContributorInsightsSpecification.builder()
                .enabled(true)
                .build())
        .tableClass(TableClass.STANDARD_INFREQUENT_ACCESS)
        .pointInTimeRecoverySpecification(PointInTimeRecoverySpecification.builder()
                .pointInTimeRecoveryEnabled(true)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var table = new TableV2(this, "Table", new TablePropsV2 {
    PartitionKey = new Attribute { Name = "pk", Type = AttributeType.STRING },
    ContributorInsightsSpecification = new ContributorInsightsSpecification {
        Enabled = true
    },
    TableClass = TableClass.STANDARD_INFREQUENT_ACCESS,
    PointInTimeRecoverySpecification = new PointInTimeRecoverySpecification {
        PointInTimeRecoveryEnabled = true
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
table := dynamodb.NewTableV2(this, jsii.String("Table"), &TablePropsV2{
	PartitionKey: &Attribute{
		Name: jsii.String("pk"),
		Type: dynamodb.AttributeType_STRING,
	},
	ContributorInsightsSpecification: &ContributorInsightsSpecification{
		Enabled: jsii.Boolean(true),
	},
	TableClass: dynamodb.TableClass_STANDARD_INFREQUENT_ACCESS,
	PointInTimeRecoverySpecification: &PointInTimeRecoverySpecification{
		PointInTimeRecoveryEnabled: jsii.Boolean(true),
	},
})

Properties ​

pointInTimeRecoveryEnabledbooleanpoint_in_time_recovery_enabledboolpointInTimeRecoveryEnabledBooleanPointInTimeRecoveryEnabledboolPointInTimeRecoveryEnabled*bool = false required #
Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.
recoveryPeriodInDaysoptionalnumberrecovery_period_in_daysoptionalint | floatrecoveryPeriodInDaysoptionalNumberRecoveryPeriodInDaysoptionaldoubleRecoveryPeriodInDaysoptional*float64 = 35 #
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. If no value is provided, the value will default to 35.