Annotation Type DynamoDbSecondarySortKey


@SdkPublicApi @Target(METHOD) @Retention(RUNTIME) @Repeatable(DynamoDbSecondarySortKeys.class) public @interface DynamoDbSecondarySortKey
Denotes an optional sort key for a global or local secondary index.

You must also specify at least one index name. For global secondary indices, this must match an index name specified in a DynamoDbSecondaryPartitionKey. Any index names specified that do not have an associated DynamoDbSecondaryPartitionKey are treated as local secondary indexes.

The index name will be used if a table is created from this bean. For data-oriented operations like reads and writes, this name does not need to match the service-side name of the index.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The names of one or more local or global secondary indices that this sort key should participate in.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The order of this sort key attribute in composite keys (0-3).
  • Element Details

    • indexNames

      String[] indexNames
      The names of one or more local or global secondary indices that this sort key should participate in.

      For global secondary indices, this must match an index name specified in a DynamoDbSecondaryPartitionKey. Any index names specified that do not have an associated DynamoDbSecondaryPartitionKey are treated as local secondary indexes.

    • order

      Order order
      The order of this sort key attribute in composite keys (0-3). Required when multiple sort keys are defined.
      Default:
      UNSPECIFIED