KeySchema

class aws_cdk.aws_dynamodb.KeySchema(*, partition_keys, sort_keys)

Bases: object

A description of a key schema of an LSI, GSI or Table.

Parameters:
  • partition_keys (Sequence[Union[Attribute, Dict[str, Any]]]) – Partition key definition. This array has at least one, but potentially multiple entries. Together, they form the partition key.

  • sort_keys (Sequence[Union[Attribute, Dict[str, Any]]]) – Sort key definition. This array has zero or more entries. Together, they form the 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

key_schema = dynamodb.KeySchema(
    partition_keys=[dynamodb.Attribute(
        name="name",
        type=dynamodb.AttributeType.BINARY
    )],
    sort_keys=[dynamodb.Attribute(
        name="name",
        type=dynamodb.AttributeType.BINARY
    )]
)

Attributes

partition_keys

Partition key definition.

This array has at least one, but potentially multiple entries. Together, they form the partition key.

sort_keys

Sort key definition.

This array has zero or more entries. Together, they form the sort key.