Table of Contents

Class GlobalSecondaryIndex

Namespace
DynaSharp.Requests
Assembly
DynaSharp.dll

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

string

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

IReadOnlyList<KeySchemaElement>

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

OnDemandThroughput

Projection

Gets the attributes copied into the index.

public required IndexProjection Projection { get; init; }

Property Value

IndexProjection

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

ProvisionedThroughput

Methods

Equals(GlobalSecondaryIndex?)

public bool Equals(GlobalSecondaryIndex? other)

Parameters

other GlobalSecondaryIndex

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(GlobalSecondaryIndex?, GlobalSecondaryIndex?)

public static bool operator ==(GlobalSecondaryIndex? left, GlobalSecondaryIndex? right)

Parameters

left GlobalSecondaryIndex
right GlobalSecondaryIndex

Returns

bool

operator !=(GlobalSecondaryIndex?, GlobalSecondaryIndex?)

public static bool operator !=(GlobalSecondaryIndex? left, GlobalSecondaryIndex? right)

Parameters

left GlobalSecondaryIndex
right GlobalSecondaryIndex

Returns

bool