SecondaryIndexProps

class aws_cdk.aws_dynamodb.SecondaryIndexProps(*, index_name, non_key_attributes=None, projection_type=None)

Bases: object

Properties for a secondary index.

Parameters:
  • index_name (str) – The name of the secondary index.

  • non_key_attributes (Optional[Sequence[str]]) – The non-key attributes that are projected into the secondary index. Default: - No additional attributes

  • projection_type (Optional[ProjectionType]) – The set of attributes that are projected into the secondary index. Default: ALL

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_dynamodb as dynamodb

secondary_index_props = dynamodb.SecondaryIndexProps(
    index_name="indexName",

    # the properties below are optional
    non_key_attributes=["nonKeyAttributes"],
    projection_type=dynamodb.ProjectionType.KEYS_ONLY
)

Attributes

index_name

The name of the secondary index.

non_key_attributes

The non-key attributes that are projected into the secondary index.

Default:
  • No additional attributes

projection_type

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

Default:

ALL