interface LocalSecondaryIndexProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.DynamoDB.LocalSecondaryIndexProps |
![]() | software.amazon.awscdk.services.dynamodb.LocalSecondaryIndexProps |
![]() | aws_cdk.aws_dynamodb.LocalSecondaryIndexProps |
![]() | @aws-cdk/aws-dynamodb » LocalSecondaryIndexProps |
Properties for a local secondary index.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as dynamodb from '@aws-cdk/aws-dynamodb';
const localSecondaryIndexProps: dynamodb.LocalSecondaryIndexProps = {
indexName: 'indexName',
sortKey: {
name: 'name',
type: dynamodb.AttributeType.BINARY,
},
// the properties below are optional
nonKeyAttributes: ['nonKeyAttributes'],
projectionType: dynamodb.ProjectionType.KEYS_ONLY,
};
Properties
Name | Type | Description |
---|---|---|
index | string | The name of the secondary index. |
sort | Attribute | The attribute of a sort key for the local secondary index. |
non | string[] | The non-key attributes that are projected into the secondary index. |
projection | Projection | The set of attributes that are projected into the secondary index. |
indexName
Type:
string
The name of the secondary index.
sortKey
Type:
Attribute
The attribute of a sort key for the local secondary index.
nonKeyAttributes?
Type:
string[]
(optional, default: No additional attributes)
The non-key attributes that are projected into the secondary index.
projectionType?
Type:
Projection
(optional, default: ALL)
The set of attributes that are projected into the secondary index.