Table of Contents

Class KeysAndAttributes

Namespace
DynaSharp.Requests
Assembly
DynaSharp.dll

The items to read from one table in a BatchGetItemRequest, and how to read them. DynamoDB returns the same structure as UnprocessedKeys, so a value from there can be sent back unchanged.

public sealed record KeysAndAttributes : IEquatable<KeysAndAttributes>
Inheritance
KeysAndAttributes
Implements
Inherited Members

Constructors

KeysAndAttributes()

public KeysAndAttributes()

Properties

ConsistentRead

Gets a value indicating whether to use strongly consistent reads for the items of this table. The default eventually consistent read costs half the capacity but may miss writes from the last second. The setting is per table.

public bool ConsistentRead { get; init; }

Property Value

bool

ExpressionAttributeNames

Gets the substitutions for #name placeholders in ProjectionExpression. Use it to alias attribute names that are DynamoDB reserved words, such as name, status, size, order or total, which DynamoDB rejects with a ValidationException when an expression uses them directly (the check is case-insensitive), and names with a dot or other special characters. See the list of reserved words.

public IReadOnlyDictionary<string, string>? ExpressionAttributeNames { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Keys

Gets the primary keys of the items to read: for each item the partition key and, if the table has one, the sort key. A key that occurs twice in a request makes DynamoDB reject the request. All tables of a request together can name at most 100 keys.

public required IReadOnlyList<IReadOnlyDictionary<string, AttributeValue>> Keys { get; init; }

Property Value

IReadOnlyList<IReadOnlyDictionary<string, AttributeValue>>

ProjectionExpression

Gets the attributes to return for the items of this table, for example "#n, Address.City". All attributes when null. DynamoDB does not return items in any particular order, so include the key attributes to tell the returned items apart. Attribute names that are DynamoDB reserved words, such as name, status, size, order or total, must be aliased with a #placeholder defined in ExpressionAttributeNames; written directly, DynamoDB rejects the request with a ValidationException. See the list of reserved words.

public string? ProjectionExpression { get; init; }

Property Value

string

Methods

Equals(KeysAndAttributes?)

public bool Equals(KeysAndAttributes? other)

Parameters

other KeysAndAttributes

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 ==(KeysAndAttributes?, KeysAndAttributes?)

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

Parameters

left KeysAndAttributes
right KeysAndAttributes

Returns

bool

operator !=(KeysAndAttributes?, KeysAndAttributes?)

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

Parameters

left KeysAndAttributes
right KeysAndAttributes

Returns

bool