Request class for the BatchWriteItem operation. Put or delete multiple items in one or more table.

### Hierarchy

- BatchWriteRequest

## Index

### Constructors

- constructor

### Properties

- params

### Methods

- delete
- exec
- execFullResponse
- put
- returnConsumedCapacity
- returnItemCollectionMetrics

## Constructors

### constructor

- new BatchWriteRequest(): BatchWriteRequest

- - Defined in dynamo/batchwrite/batch-write.request.ts:19

  #### Returns BatchWriteRequest

## Properties

### params

params: BatchWriteItemInput

- Defined in dynamo/batchwrite/batch-write.request.ts:17

## Methods

### delete

- delete<T>(modelClazz: ModelConstructor<T>, keys: Array<Partial<T>>): BatchWriteRequest

- - Defined in dynamo/batchwrite/batch-write.request.ts:49

  add keys for deletion

  #### Type parameters

  - #### T

  #### Parameters

  - ##### modelClazz: ModelConstructor<T>

    the corresponding ModelConstructor

  - ##### keys: Array<Partial<T>>

    an array of partials of T that contains PartitionKey and SortKey (if necessary). Throws if missing.

  #### Returns BatchWriteRequest

### exec

- exec(backoffTimer?: randomExponentialBackoffTimer, throttleTimeSlot?: number): Promise<void>

- - Defined in dynamo/batchwrite/batch-write.request.ts:69

  execute request

  #### Parameters

  - ##### Default value backoffTimer: randomExponentialBackoffTimer = randomExponentialBackoffTimer

    generator for how much timeSlots should be waited before requesting next batch. only used when capacity was exceeded. default randomExponentialBackoffTimer

  - ##### Default value throttleTimeSlot: number = BATCH_WRITE_DEFAULT_TIME_SLOT

    defines how long one timeSlot is for throttling, default 1 second

  #### Returns Promise<void>

### execFullResponse

- execFullResponse(backoffTimer?: randomExponentialBackoffTimer, throttleTimeSlot?: number): Promise<BatchWriteItemOutput>

- - Defined in dynamo/batchwrite/batch-write.request.ts:82

  execute request and return (last) response

  #### Parameters

  - ##### Default value backoffTimer: randomExponentialBackoffTimer = randomExponentialBackoffTimer

    generator for how much timeSlots should be waited before requesting next batch. only used when capacity was exceeded. default randomExponentialBackoffTimer

  - ##### Default value throttleTimeSlot: number = BATCH_WRITE_DEFAULT_TIME_SLOT

    defines how long one timeSlot is for throttling, default 1 second

  #### Returns Promise<BatchWriteItemOutput>

### put

- put<T>(modelClazz: ModelConstructor<T>, items: T[]): BatchWriteRequest

- - Defined in dynamo/batchwrite/batch-write.request.ts:59

  add items to put

  #### Type parameters

  - #### T

  #### Parameters

  - ##### modelClazz: ModelConstructor<T>

    the corresponding ModelConstructor

  - ##### items: T[]

    the items to put

  #### Returns BatchWriteRequest

### returnConsumedCapacity

- returnConsumedCapacity(value: DynamoDB.ReturnConsumedCapacity): BatchWriteRequest

- - Defined in dynamo/batchwrite/batch-write.request.ts:31

  return ConsumedCapacity of the corresponding tables in the response

  #### Parameters

  - ##### value: DynamoDB.ReturnConsumedCapacity

  #### Returns BatchWriteRequest

### returnItemCollectionMetrics

- returnItemCollectionMetrics(value: DynamoDB.ReturnItemCollectionMetrics): BatchWriteRequest

- - Defined in dynamo/batchwrite/batch-write.request.ts:39

  return item collection metrics.

  #### Parameters

  - ##### value: DynamoDB.ReturnItemCollectionMetrics

  #### Returns BatchWriteRequest