Interface IDynamoTableBatchWriteItems
Interface to specify the BatchWriteItems operation.
Namespace: LambdaSharp.DynamoDB.Native.Operations
Assembly: LambdaSharp.DynamoDB.Native.dll
Syntax
public interface IDynamoTableBatchWriteItems
Methods
BeginPutItem<TRecord>(DynamoPrimaryKey<TRecord>, TRecord)
Begin specification of a PutItem operation for BatchWriteItems.
Declaration
IDynamoTableBatchWriteItemsPutItem<TRecord> BeginPutItem<TRecord>(DynamoPrimaryKey<TRecord> primaryKey, TRecord record)
where TRecord : class
Parameters
Type | Name | Description |
---|---|---|
Dynamo |
primaryKey | Primary key of the item to write. |
TRecord | record | The record to write |
Returns
Type | Description |
---|---|
IDynamo |
Type Parameters
Name | Description |
---|---|
TRecord | The record type. |
DeleteItem<TRecord>(DynamoPrimaryKey<TRecord>)
Add a DeleteItem operation to BatchWriteItems for the given primary key.
Declaration
IDynamoTableBatchWriteItems DeleteItem<TRecord>(DynamoPrimaryKey<TRecord> primaryKey)
where TRecord : class
Parameters
Type | Name | Description |
---|---|---|
Dynamo |
primaryKey | Primary key of the item to delete. |
Returns
Type | Description |
---|---|
IDynamo |
Type Parameters
Name | Description |
---|---|
TRecord | The record type. |
ExecuteAsync(Int32, CancellationToken)
Execute the BatchWriteItems operation.
Declaration
Task ExecuteAsync(int maxAttempts = 5, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System. |
maxAttempts | Maximum number of attempts with exponential back when encountering provisioned throughput is exceeded. |
System. |
cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System. |
Exceptions
Type | Condition |
---|---|
Dynamo |
Thrown when the maximum number of attempts is exceeded. |
PutItem<TRecord>(TRecord, DynamoPrimaryKey<TRecord>)
Add a PutItem operation to BatchWriteItems for the given primary key and record. When successful, this operation creates a new row or replaces all attributes of the matching row.
Declaration
IDynamoTableBatchWriteItems PutItem<TRecord>(TRecord record, DynamoPrimaryKey<TRecord> primaryKey)
where TRecord : class
Parameters
Type | Name | Description |
---|---|---|
TRecord | record | The record to write |
Dynamo |
primaryKey | Primary key of the item to write. |
Returns
Type | Description |
---|---|
IDynamo |
Type Parameters
Name | Description |
---|---|
TRecord | The record type. |