Table of Contents

Class BatchWriteItemRequest

Namespace
DynaSharp.Requests
Assembly
DynaSharp.dll

Puts or deletes items in one or more tables in a single call (DynamoDB BatchWriteItem).

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

Remarks

This is the low-level request: the library neither splits a request that is too large nor repeats the writes DynamoDB leaves unprocessed. A call can contain at most 25 writes in all and transmit at most 16 MB; an item can be at most 400 KB. DynamoDB rejects the whole request, as a ValidationException, when it exceeds a limit, when it addresses a table that does not exist, when a key does not match the key schema of its table, or when it contains two writes for the same item (also a put and a delete of one item).

Each write is atomic, the batch as a whole is not. A batch cannot update items (a put replaces the item), and its writes cannot have conditions. Use TransactWriteItemsRequest for either.

Constructors

BatchWriteItemRequest()

public BatchWriteItemRequest()

Properties

RequestItems

Gets the writes, by table name (or table ARN). Each table can occur once. DynamoDB rejects an empty map and an empty list for a table.

public required IReadOnlyDictionary<string, IReadOnlyList<WriteRequest>> RequestItems { get; init; }

Property Value

IReadOnlyDictionary<string, IReadOnlyList<WriteRequest>>

ReturnConsumedCapacity

Gets whether to report consumed capacity in ConsumedCapacity, one entry per table.

public ReturnConsumedCapacity ReturnConsumedCapacity { get; init; }

Property Value

ReturnConsumedCapacity

ReturnItemCollectionMetrics

Gets whether to report the size of the item collections that were modified in ItemCollectionMetrics. Only tables with a local secondary index have item collections.

public ReturnItemCollectionMetrics ReturnItemCollectionMetrics { get; init; }

Property Value

ReturnItemCollectionMetrics

Methods

Equals(BatchWriteItemRequest?)

public bool Equals(BatchWriteItemRequest? other)

Parameters

other BatchWriteItemRequest

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

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

Parameters

left BatchWriteItemRequest
right BatchWriteItemRequest

Returns

bool

operator !=(BatchWriteItemRequest?, BatchWriteItemRequest?)

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

Parameters

left BatchWriteItemRequest
right BatchWriteItemRequest

Returns

bool