interface KeySchema
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.DynamoDB.KeySchema |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#KeySchema |
Java | software.amazon.awscdk.services.dynamodb.KeySchema |
Python | aws_cdk.aws_dynamodb.KeySchema |
TypeScript (source) | aws-cdk-lib » aws_dynamodb » KeySchema |
Obtainable from
Table.schemaV2()
A description of a key schema of an LSI, GSI or Table.
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 keySchema: dynamodb.KeySchema = {
partitionKeys: [{
name: 'name',
type: dynamodb.AttributeType.BINARY,
}],
sortKeys: [{
name: 'name',
type: dynamodb.AttributeType.BINARY,
}],
};
Properties
| Name | Type | Description |
|---|---|---|
| partition | Attribute[] | Partition key definition. |
| sort | Attribute[] | Sort key definition. |
partitionKeys
Type:
Attribute[]
Partition key definition.
This array has at least one, but potentially multiple entries. Together, they form the partition key.
sortKeys
Type:
Attribute[]
Sort key definition.
This array has zero or more entries. Together, they form the sort key.

.NET
Go
Java
Python
TypeScript (