Class LocalSecondaryIndexProps
Properties for a local secondary index.
Inheritance
System.Object
LocalSecondaryIndexProps
Namespace: Amazon.CDK.AWS.DynamoDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class LocalSecondaryIndexProps : Object, ILocalSecondaryIndexProps, ISecondaryIndexProps
Syntax (vb)
Public Class LocalSecondaryIndexProps
Inherits Object
Implements ILocalSecondaryIndexProps, ISecondaryIndexProps
Remarks
ExampleMetadata: infused
Examples
var table = new TableV2(this, "Table", new TablePropsV2 {
PartitionKey = new Attribute { Name = "pk", Type = AttributeType.STRING },
SortKey = new Attribute { Name = "sk", Type = AttributeType.NUMBER },
LocalSecondaryIndexes = new [] { new LocalSecondaryIndexProps {
IndexName = "lsi1",
SortKey = new Attribute { Name = "sk", Type = AttributeType.NUMBER }
} }
});
table.AddLocalSecondaryIndex(new LocalSecondaryIndexProps {
IndexName = "lsi2",
SortKey = new Attribute { Name = "sk", Type = AttributeType.NUMBER }
});
Synopsis
Constructors
LocalSecondaryIndexProps() |
Properties
IndexName | The name of the secondary index. |
NonKeyAttributes | The non-key attributes that are projected into the secondary index. |
ProjectionType | The set of attributes that are projected into the secondary index. |
SortKey | The attribute of a sort key for the local secondary index. |
Constructors
LocalSecondaryIndexProps()
public LocalSecondaryIndexProps()
Properties
IndexName
The name of the secondary index.
public string IndexName { get; set; }
Property Value
System.String
NonKeyAttributes
The non-key attributes that are projected into the secondary index.
public string[] NonKeyAttributes { get; set; }
Property Value
System.String[]
Remarks
Default: - No additional attributes
ProjectionType
The set of attributes that are projected into the secondary index.
public Nullable<ProjectionType> ProjectionType { get; set; }
Property Value
System.Nullable<ProjectionType>
Remarks
Default: ALL
SortKey
The attribute of a sort key for the local secondary index.
public IAttribute SortKey { get; set; }
Property Value