aws-cdk-lib.aws_dynamodb.LocalSecondaryIndexProps

interface LocalSecondaryIndexProps

LanguageType name
.NETAmazon.CDK.AWS.DynamoDB.LocalSecondaryIndexProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#LocalSecondaryIndexProps
Javasoftware.amazon.awscdk.services.dynamodb.LocalSecondaryIndexProps
Pythonaws_cdk.aws_dynamodb.LocalSecondaryIndexProps
TypeScript (source)aws-cdk-lib » 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 { aws_dynamodb as dynamodb } from 'aws-cdk-lib';
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

NameTypeDescription
indexNamestringThe name of the secondary index.
sortKeyAttributeThe attribute of a sort key for the local secondary index.
nonKeyAttributes?string[]The non-key attributes that are projected into the secondary index.
projectionType?ProjectionTypeThe 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: ProjectionType (optional, default: ALL)

The set of attributes that are projected into the secondary index.