aws-cdk-lib.aws_dynamodb.SecondaryIndexProps

interface SecondaryIndexProps

LanguageType name
.NETAmazon.CDK.AWS.DynamoDB.SecondaryIndexProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#SecondaryIndexProps
Javasoftware.amazon.awscdk.services.dynamodb.SecondaryIndexProps
Pythonaws_cdk.aws_dynamodb.SecondaryIndexProps
TypeScript (source)aws-cdk-lib » aws_dynamodb » SecondaryIndexProps

Properties for a 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 secondaryIndexProps: dynamodb.SecondaryIndexProps = {
  indexName: 'indexName',

  // the properties below are optional
  nonKeyAttributes: ['nonKeyAttributes'],
  projectionType: dynamodb.ProjectionType.KEYS_ONLY,
};

Properties

NameTypeDescription
indexNamestringThe name of the 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.


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.