SchemaOptions

class aws_cdk.aws_dynamodb.SchemaOptions(*, partition_key, sort_key=None)

Bases: object

Represents the table schema attributes.

Parameters
  • partition_key (Attribute) – Partition key attribute definition.

  • sort_key (Optional[Attribute]) – Sort key attribute definition. Default: no sort key

Example:

# table is of type Table

schema = table.schema()
partition_key = schema.partition_key
sort_key = schema.sort_key

Attributes

partition_key

Partition key attribute definition.

Return type

Attribute

sort_key

Sort key attribute definition.

Default

no sort key

Return type

Optional[Attribute]