DynamoDBClient.transact_write_items
rboto-dynamodb==0.4.0 · Service index · Types
Model summary (excerpt): TransactWriteItems is a synchronous write operation that groups up to 100 action requests. These actions can target items in different tables, but not in different Amazon Web Services accounts or Regions, and no two actions can target the same item. For example, you cannot both ConditionCheck and Update the same item. The aggregate size of the items in the transaction cannot exceed 4 MB. The...
Install and imports
from rboto import DynamoDBClient
from collections.abc import Sequence
from rboto_dynamodb.types import (
ReturnConsumedCapacity,
ReturnItemCollectionMetrics,
TransactWriteItem,
TransactWriteItemsOutput,
)
Signature
async def transact_write_items(
*,
transact_items: Sequence[TransactWriteItem],
return_consumed_capacity: ReturnConsumedCapacity | None = None,
return_item_collection_metrics: ReturnItemCollectionMetrics | None = None,
client_request_token: str | None = None,
) -> TransactWriteItemsOutput: ...
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) |
|---|---|---|
transact_items |
Yes | An ordered array of up to 100 TransactWriteItem objects, each of which contains a ConditionCheck , Put , Update , or Delete object. These can operate on items in different tables, but the tables must reside in the same Amazon Web Services account and Region, and no two of them can operate on the same 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 and are returned in the response. If set to NONE (the default), no statistics are returned. |
client_request_token |
No | Providing a ClientRequestToken makes the call to TransactWriteItems idempotent, meaning that multiple identical calls have the same effect as one single call. Although multiple identical calls using the same client request token produce the same result on the server (no side effects), the responses to the calls might not be the same. If the ReturnConsumedCapacity parameter is set, then the... |
Output
TransactWriteItemsOutput.
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 |
|---|---|---|---|
consumed_capacity |
list[ConsumedCapacityOutput] | None |
Always present | ConsumedCapacityOutput |
item_collection_metrics |
dict[str, list[ItemCollectionMetricsOutput]] | None |
Always present | ItemCollectionMetricsOutput |
| 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
ReturnConsumedCapacity, ReturnItemCollectionMetrics, TransactWriteItem, TransactWriteItemsOutput
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:
IdempotentParameterMismatchError, InternalServerError, InvalidEndpointError, ProvisionedThroughputExceededError, RequestLimitExceededError, ResourceNotFoundError, ThrottlingError, TransactionCanceledError, TransactionInProgressError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.