Attribute
- class aws_cdk.aws_dynamodb.Attribute(*, name, type)
Bases:
object
Represents an attribute for describing the key schema for the table and indexes.
- Parameters:
name (
str
) – The name of an attribute.type (
AttributeType
) – The data type of an attribute.
- ExampleMetadata:
infused
Example:
global_table = dynamodb.Table(self, "Table", partition_key=dynamodb.Attribute(name="id", type=dynamodb.AttributeType.STRING), replication_regions=["us-east-1", "us-east-2", "us-west-2"], billing_mode=dynamodb.BillingMode.PROVISIONED ) global_table.auto_scale_write_capacity( min_capacity=1, max_capacity=10 ).scale_on_utilization(target_utilization_percent=75)
Attributes
- name
The name of an attribute.
- type
The data type of an attribute.