SchemaOptions

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

Bases: object

Represents the table schema attributes.

Parameters:
  • partition_key (Union[Attribute, Dict[str, Any]]) – Partition key attribute definition.

  • sort_key (Union[Attribute, Dict[str, Any], None]) – Sort key attribute definition. Default: no sort key

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_dynamodb as dynamodb

schema_options = dynamodb.SchemaOptions(
    partition_key=dynamodb.Attribute(
        name="name",
        type=dynamodb.AttributeType.BINARY
    ),

    # the properties below are optional
    sort_key=dynamodb.Attribute(
        name="name",
        type=dynamodb.AttributeType.BINARY
    )
)

Attributes

partition_key

Partition key attribute definition.

sort_key

Sort key attribute definition.

Default:

no sort key