Class DocumentBatchWrite
- Namespace
- Amazon.DynamoDBv2.DocumentModel
- Assembly
- AWSSDK.DynamoDBv2.dll
Class for putting and/or deleting a batch of items in a single DynamoDB table.
public class DocumentBatchWrite
- Inheritance
-
DocumentBatchWrite
- Inherited Members
Constructors
DocumentBatchWrite(Table)
Constructs a DocumentBatchWrite instance for a specific table.
public DocumentBatchWrite(Table targetTable)
Parameters
targetTable
TableTable to get items from.
Methods
AddDocumentToPut(Document)
Add a single Document to put.
public void AddDocumentToPut(Document document)
Parameters
document
DocumentDocument to put.
AddItemToDelete(Document)
Add a single item to delete, identified by a Document object.
public void AddItemToDelete(Document document)
Parameters
document
DocumentDocument representing the item to be deleted.
AddKeyToDelete(Primitive)
Add a single item to delete, identified by its hash primary key.
public void AddKeyToDelete(Primitive hashKey)
Parameters
hashKey
PrimitiveHash key element of the item to delete.
AddKeyToDelete(Primitive, Primitive)
Add a single item to delete, identified by its hash-and-range primary key.
public void AddKeyToDelete(Primitive hashKey, Primitive rangeKey)
Parameters
hashKey
PrimitiveHash key element of the item to delete.
rangeKey
PrimitiveRange key element of the item to delete.
AddKeyToDelete(IDictionary<string, DynamoDBEntry>)
Add a single item to delete, identified by its key.
public void AddKeyToDelete(IDictionary<string, DynamoDBEntry> key)
Parameters
key
IDictionary<string, DynamoDBEntry>Key of the item to delete.
Combine(DocumentBatchWrite)
Creates a MultiTableDocumentBatchWrite object that is a combination of the current DocumentBatchWrite and the specified DocumentBatchWrite.
public MultiTableDocumentBatchWrite Combine(DocumentBatchWrite otherBatch)
Parameters
otherBatch
DocumentBatchWriteOther DocumentBatchWrite object.
Returns
- MultiTableDocumentBatchWrite
MultiTableDocumentBatchWrite consisting of the two DocumentBatchWrite objects.
ExecuteAsync(CancellationToken)
Initiates the asynchronous execution of the Execute operation. Amazon.DynamoDBv2.DocumentModel.DocumentBatchWrite.Execute
public Task ExecuteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenToken which can be used to cancel the task.
Returns
- Task
A Task that can be used to poll or wait for results, or both.