Table of Contents

Class GetItemRequest

Namespace
DynaSharp.Requests
Assembly
DynaSharp.dll

Reads a single item by its full primary key (DynamoDB GetItem).

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

Constructors

GetItemRequest()

public GetItemRequest()

Properties

ConsistentRead

Gets a value indicating whether to use a strongly consistent read. The default eventually consistent read costs half the capacity but may miss writes from the last second.

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>

Key

Gets the full primary key: the partition key and, if the table has one, the sort key.

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

Property Value

IReadOnlyDictionary<string, AttributeValue>

ProjectionExpression

Gets the attributes to return, for example "#n, Address.City". All attributes when null. 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

ReturnConsumedCapacity

Gets whether to report consumed capacity in ConsumedCapacity.

public ReturnConsumedCapacity ReturnConsumedCapacity { get; init; }

Property Value

ReturnConsumedCapacity

TableName

Gets the table name (or table ARN).

public required string TableName { get; init; }

Property Value

string

Methods

Equals(GetItemRequest?)

public bool Equals(GetItemRequest? other)

Parameters

other GetItemRequest

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

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

Parameters

left GetItemRequest
right GetItemRequest

Returns

bool

operator !=(GetItemRequest?, GetItemRequest?)

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

Parameters

left GetItemRequest
right GetItemRequest

Returns

bool