AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Adds a global secondary index definition to the table with composite keys (max 4 elements each)

Namespace: Amazon.DynamoDBv2.DocumentModel
Assembly: AWSSDK.DynamoDBv2.dll
Version: 3.x.y.z

Syntax

C#
public virtual ITableBuilder AddGlobalSecondaryIndex(
         String indexName,
         List<KeyValuePair<String, DynamoDBEntryType>> hashkeyAttributes,
         List<KeyValuePair<String, DynamoDBEntryType>> rangeKeyAttributes
)

Parameters

indexName
Type: System.String

Name of the global secondary index

hashkeyAttributes
Type: System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.String, Amazon.DynamoDBv2.DocumentModel.DynamoDBEntryType>>

List of hash key attribute names and their types for composite partition key

rangeKeyAttributes
Type: System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.String, Amazon.DynamoDBv2.DocumentModel.DynamoDBEntryType>>

List of range key attribute names and their types for composite sort key

Return Value


The table builder instance for method chaining

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer