aws-cdk-lib.aws_dynamodb.SchemaOptions

interface SchemaOptions

LanguageType name
.NETAmazon.CDK.AWS.DynamoDB.SchemaOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#SchemaOptions
Javasoftware.amazon.awscdk.services.dynamodb.SchemaOptions
Pythonaws_cdk.aws_dynamodb.SchemaOptions
TypeScript (source)aws-cdk-lib » aws_dynamodb » SchemaOptions

Obtainable from Table.schema()

Represents the table schema attributes.

Example

declare const table: dynamodb.Table;
const schema = table.schema();
const partitionKey = schema.partitionKey;
const sortKey = schema.sortKey;

// In case you want to get schema details for any secondary index
// const { partitionKey, sortKey } = table.schema(INDEX_NAME);

Properties

NameTypeDescription
partitionKeyAttributePartition key attribute definition.
sortKey?AttributeSort key attribute definition.

partitionKey

Type: Attribute

Partition key attribute definition.


sortKey?

Type: Attribute (optional, default: no sort key)

Sort key attribute definition.