interface SchemaOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.DynamoDB.SchemaOptions |
![]() | software.amazon.awscdk.services.dynamodb.SchemaOptions |
![]() | aws_cdk.aws_dynamodb.SchemaOptions |
![]() | @aws-cdk/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
Name | Type | Description |
---|---|---|
partition | Attribute | Partition key attribute definition. |
sort | Attribute | Sort key attribute definition. |
partitionKey
Type:
Attribute
Partition key attribute definition.
sortKey?
Type:
Attribute
(optional, default: no sort key)
Sort key attribute definition.