Skip to content
v2.278.0

MaxThroughputProps Struct ​

Properties used to configure maximum throughput for an on-demand table.

Example ​

ts
const table = new dynamodb.TableV2(this, 'Table', {
  partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
  billing: dynamodb.Billing.onDemand({
    maxReadRequestUnits: 100,
    maxWriteRequestUnits: 115,
  }),
})
python
table = dynamodb.TableV2(self, "Table",
    partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
    billing=dynamodb.Billing.on_demand(
        max_read_request_units=100,
        max_write_request_units=115
    )
)
java
TableV2 table = TableV2.Builder.create(this, "Table")
        .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
        .billing(Billing.onDemand(MaxThroughputProps.builder()
                .maxReadRequestUnits(100)
                .maxWriteRequestUnits(115)
                .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 },
    Billing = Billing.OnDemand(new MaxThroughputProps {
        MaxReadRequestUnits = 100,
        MaxWriteRequestUnits = 115
    })
});
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,
	},
	Billing: dynamodb.Billing_OnDemand(&MaxThroughputProps{
		MaxReadRequestUnits: jsii.Number(100),
		MaxWriteRequestUnits: jsii.Number(115),
	}),
})

Properties ​

maxReadRequestUnitsoptionalnumbermax_read_request_unitsoptionalint | floatmaxReadRequestUnitsoptionalNumberMaxReadRequestUnitsoptionaldoubleMaxReadRequestUnitsoptional*float64 #
The max read request units.

Default: if table mode is on-demand and this property is undefined, no maximum throughput limit will be put in place for read requests. This property is only applicable for tables using on-demand mode.

maxWriteRequestUnitsoptionalnumbermax_write_request_unitsoptionalint | floatmaxWriteRequestUnitsoptionalNumberMaxWriteRequestUnitsoptionaldoubleMaxWriteRequestUnitsoptional*float64 #
The max write request units.

Default: if table mode is on-demand and this property is undefined, no maximum throughput limit will be put in place for write requests. This property is only applicable for tables using on-demand mode.