Amazon DynamoDB · Types · Amazon DynamoDB's own types
ArxDynamoWriteOptions
Definition
- Namespace
ARX.SDK.DynamoDb.Services- Package
ARX.SDK.DynamoDb
public sealed class ArxDynamoWriteOptionsOptions for DynamoDB writes of several items.
Properties
bool AllowPartial { get; init; }False (the default): a write of more than 100 items is refused (ARX8001): DynamoDB's transactions hold at most 100. True: the items go in transactions of 100, one after another; a failure leaves the earlier transactions written, and the error says how many items were.
bool AllowKeyChange { get; init; }False (the default): an update whose RecordId and id attribute differ (a new key) is ARX1001. True: the item is moved: read, changed, and written under its new key while the old one is deleted, in one transaction (the new key taken is ARX3001; the keys, the type attribute and the index keys are rendered again). A change made by someone else between the read and the move is lost with the old item.
Usage
A line from a verified sample; the full, runnable code is on its page.
var ids = await service.CreateMultipleAsync(products, new ArxDynamoWriteOptions { AllowPartial = true });Create many records in one call, scenario 3
Used in:
- Create many records in one callCreateMultiple
- Move an item to a new keyUpdate