Class GlobalSecondaryIndexProps
Properties for a global secondary index.
Inheritance
Namespace: Amazon.CDK.AWS.DynamoDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GlobalSecondaryIndexProps : Object, IGlobalSecondaryIndexProps, ISecondaryIndexProps, ISchemaOptions
Syntax (vb)
Public Class GlobalSecondaryIndexProps
Inherits Object
Implements IGlobalSecondaryIndexProps, ISecondaryIndexProps, ISchemaOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DynamoDB;
var globalSecondaryIndexProps = new GlobalSecondaryIndexProps {
IndexName = "indexName",
PartitionKey = new Attribute {
Name = "name",
Type = AttributeType.BINARY
},
// the properties below are optional
NonKeyAttributes = new [] { "nonKeyAttributes" },
ProjectionType = ProjectionType.KEYS_ONLY,
ReadCapacity = 123,
SortKey = new Attribute {
Name = "name",
Type = AttributeType.BINARY
},
WriteCapacity = 123
};
Synopsis
Constructors
GlobalSecondaryIndexProps() |
Properties
IndexName | The name of the secondary index. |
NonKeyAttributes | The non-key attributes that are projected into the secondary index. |
PartitionKey | Partition key attribute definition. |
ProjectionType | The set of attributes that are projected into the secondary index. |
ReadCapacity | The read capacity for the global secondary index. |
SortKey | Sort key attribute definition. |
WriteCapacity | The write capacity for the global secondary index. |
Constructors
GlobalSecondaryIndexProps()
public GlobalSecondaryIndexProps()
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
PartitionKey
Partition key attribute definition.
public IAttribute PartitionKey { get; set; }
Property Value
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
ReadCapacity
The read capacity for the global secondary index.
public Nullable<double> ReadCapacity { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Can only be provided if table billingMode is Provisioned or undefined.
Default: 5
SortKey
Sort key attribute definition.
public IAttribute SortKey { get; set; }
Property Value
Remarks
Default: no sort key
WriteCapacity
The write capacity for the global secondary index.
public Nullable<double> WriteCapacity { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Can only be provided if table billingMode is Provisioned or undefined.
Default: 5