Class BatchWriteItemRequest
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
ReturnConsumedCapacity
Gets whether to report consumed capacity in ConsumedCapacity, one entry per table.
public ReturnConsumedCapacity ReturnConsumedCapacity { get; init; }
Property Value
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
Methods
Equals(BatchWriteItemRequest?)
public bool Equals(BatchWriteItemRequest? other)
Parameters
otherBatchWriteItemRequest
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 ==(BatchWriteItemRequest?, BatchWriteItemRequest?)
public static bool operator ==(BatchWriteItemRequest? left, BatchWriteItemRequest? right)
Parameters
leftBatchWriteItemRequestrightBatchWriteItemRequest
Returns
operator !=(BatchWriteItemRequest?, BatchWriteItemRequest?)
public static bool operator !=(BatchWriteItemRequest? left, BatchWriteItemRequest? right)
Parameters
leftBatchWriteItemRequestrightBatchWriteItemRequest