interface SchemaOptions
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.DynamoDB.SchemaOptions |
Java | software.amazon.awscdk.services.dynamodb.SchemaOptions |
Python | aws_cdk.aws_dynamodb.SchemaOptions |
TypeScript (source) | @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.

.NET
Java
Python
TypeScript (