DynamoDBClient.batch_write_item
rboto-dynamodb==0.4.0 · Service index · Types
Model summary (excerpt): The BatchWriteItem operation puts or deletes multiple items in one or more tables. A single call to BatchWriteItem can transmit up to 16MB of data over the network, consisting of up to 25 item put or delete operations. While individual items can be up to 400 KB once stored, it's important to note that an item's representation might be greater than 400KB while being sent in DynamoDB's JSON...
Install and imports
from rboto import DynamoDBClient
from collections.abc import Sequence
from rboto_dynamodb.types import (
BatchWriteItemOutput,
ReturnConsumedCapacity,
ReturnItemCollectionMetrics,
WriteRequest,
)
Signature
async def batch_write_item(
*,
request_items: dict[str, Sequence[WriteRequest]],
return_consumed_capacity: ReturnConsumedCapacity | None = None,
return_item_collection_metrics: ReturnItemCollectionMetrics | None = None,
) -> BatchWriteItemOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
request_items |
Yes | A map of one or more table names or table ARNs and, for each table, a list of operations to be performed ( DeleteRequest or PutRequest ). Each element in the map consists of the following: DeleteRequest - Perform a DeleteItem operation on the specified item. The item to be deleted is identified by a Key subelement: Key - A map of primary key attribute values that uniquely identify the item.... |
return_consumed_capacity |
No | |
return_item_collection_metrics |
No | Determines whether item collection metrics are returned. If set to SIZE , the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to NONE (the default), no statistics are returned. |
Output
BatchWriteItemOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
unprocessed_items |
dict[str, list[WriteRequestOutput]] | None |
Always present | WriteRequestOutput |
item_collection_metrics |
dict[str, list[ItemCollectionMetricsOutput]] | None |
Always present | ItemCollectionMetricsOutput |
consumed_capacity |
list[ConsumedCapacityOutput] | None |
Always present | ConsumedCapacityOutput |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
BatchWriteItemOutput, ReturnConsumedCapacity, ReturnItemCollectionMetrics, WriteRequest
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_dynamodb.exceptions:
InternalServerError, InvalidEndpointError, ItemCollectionSizeLimitExceededError, ProvisionedThroughputExceededError, ReplicatedWriteConflictError, RequestLimitExceededError, ResourceNotFoundError, ThrottlingError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.