batchPutItem

Spec

async batchWriteItem(
    tnmInput: TynamoBatchWriteItemInput<TSource>
): Promise<TynamoBatchWriteItemOutput<TSource>>

Unlike Dynamo, there is no limit.

Internally, they are split properly and processed in parallel.

Input

export type PutOrDelete<TSource> =
    | {
          Operation: "put";
          Item: TSource;
      }
    | {
          Operation: "delete";
          Key: Partial<TSource>;
      };
      
      
export interface TynamoBatchWriteItemInput<TSource> {
    RequestItems: PutOrDelete<TSource>[];
    
    // Derived from DynamoDB.
    ReturnConsumedCapacity?: ReturnConsumedCapacity;
    ReturnItemCollectionMetrics?: ReturnItemCollectionMetrics;
}

Name

Type

Info

RequestItems

PutOrDelete<@DynamoEntity>[]

Array of single operation of put or delete.

Unlisted param is derived from DynamoDB.

Check here for more information.

Output

Name

Type

Info

UnprocessedKeys

PutOrDelete<@DynamoEntity>[]

Failed operations.

Unlisted param is derived from DynamoDB.

Check here for more information.

Example

Last updated

Was this helpful?