Table of Contents

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 Table

Table to get items from.

Methods

AddDocumentToPut(Document)

Add a single Document to put.

public void AddDocumentToPut(Document document)

Parameters

document Document

Document to put.

AddItemToDelete(Document)

Add a single item to delete, identified by a Document object.

public void AddItemToDelete(Document document)

Parameters

document Document

Document 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 Primitive

Hash 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 Primitive

Hash key element of the item to delete.

rangeKey Primitive

Range 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 DocumentBatchWrite

Other 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 CancellationToken

Token which can be used to cancel the task.

Returns

Task

A Task that can be used to poll or wait for results, or both.