interface SchemaOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.DynamoDB.SchemaOptions |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#SchemaOptions |
![]() | software.amazon.awscdk.services.dynamodb.SchemaOptions |
![]() | aws_cdk.aws_dynamodb.SchemaOptions |
![]() | aws-cdk-lib » aws_dynamodb » SchemaOptions |
Obtainable from
Table
.schema()
Represents the table schema attributes.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_dynamodb as dynamodb } from 'aws-cdk-lib';
const schemaOptions: dynamodb.SchemaOptions = {
partitionKey: {
name: 'name',
type: dynamodb.AttributeType.BINARY,
},
// the properties below are optional
sortKey: {
name: 'name',
type: dynamodb.AttributeType.BINARY,
},
};
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.