Skip to content
v2.277.0

TableClass Enum ​

DynamoDB's table class.

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),
	},
})

Members ​

MemberDescription
STANDARDDefault table class for DynamoDB.
STANDARD_INFREQUENT_ACCESSTable class for DynamoDB that reduces storage costs compared to existing DynamoDB standard tables.

Referenced by ​

  • TableOptions.tableClasstable_classtableClassTableClassTableClass
  • TableOptionsV2.tableClasstable_classtableClassTableClassTableClass