Class GlobalSecondaryIndex
A global secondary index of a table that is created: its own partition key and optional sort key, possibly other attributes than those of the table.
public sealed record GlobalSecondaryIndex : IEquatable<GlobalSecondaryIndex>
- Inheritance
-
GlobalSecondaryIndex
- Implements
- Inherited Members
Remarks
A global secondary index is eventually consistent, has throughput of its own, and a throttled index throttles the writes to the table. An item only appears in the index if it has all key attributes of the index (a sparse index). A table can have at most 20 global secondary indexes, and more can be added later.
Constructors
GlobalSecondaryIndex()
public GlobalSecondaryIndex()
Properties
IndexName
Gets the index name: 3 to 255 characters of letters, digits, underscore, hyphen and dot, unique within the table.
public required string IndexName { get; init; }
Property Value
KeySchema
Gets the key of the index: the partition key, followed by the sort key if there is one.
public required IReadOnlyList<KeySchemaElement> KeySchema { get; init; }
Property Value
OnDemandThroughput
Gets the maximum throughput of the index, for a table with PayPerRequest capacity; not allowed with Provisioned. null sets no maximum. The index has maximums of its own: those of the table do not apply to it.
public OnDemandThroughput? OnDemandThroughput { get; init; }
Property Value
Projection
Gets the attributes copied into the index.
public required IndexProjection Projection { get; init; }
Property Value
ProvisionedThroughput
Gets the capacity of the index. Required when the table has Provisioned capacity and not allowed with PayPerRequest.
public ProvisionedThroughput? ProvisionedThroughput { get; init; }
Property Value
Methods
Equals(GlobalSecondaryIndex?)
public bool Equals(GlobalSecondaryIndex? other)
Parameters
otherGlobalSecondaryIndex
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(GlobalSecondaryIndex?, GlobalSecondaryIndex?)
public static bool operator ==(GlobalSecondaryIndex? left, GlobalSecondaryIndex? right)
Parameters
leftGlobalSecondaryIndexrightGlobalSecondaryIndex
Returns
operator !=(GlobalSecondaryIndex?, GlobalSecondaryIndex?)
public static bool operator !=(GlobalSecondaryIndex? left, GlobalSecondaryIndex? right)
Parameters
leftGlobalSecondaryIndexrightGlobalSecondaryIndex