How can I create table with PITR enabled through API?

653 Views Asked by At

How can I create a dynamo db table with PITR enabled through API in java??

This is my create table request

CreateTableRequest createTableRequest = new CreateTableRequest()
                .withTableName(properties.get(TABLE_NAME).textValue())
                .withKeySchema(this.buildKeySchema(properties))
                .withAttributeDefinitions(this.buildAttributeDefinitions(properties))
                .withProvisionedThroughput(this.buildProvisionedThroughput(properties))
                .withGlobalSecondaryIndexes(this.buildGlobalSecondaryIndex(properties))
                .withBillingMode(properties.get(BILLING_MODE).textValue());

I want to add PITR enabled

1

There are 1 best solutions below

0
On BEST ANSWER

PITR is enabled using seprate api call UpdateContinuousBackupsRequest.

The Java call maps to UpdateContinuousBackups AWS API.