transact_get_items¶
Operation¶
transact_get_items
¶
transact_get_items(request: TransactGetItemsInput | TransactGetItemsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[TransactGetItemsInputDict]) -> TransactGetItemsOutput
TransactGetItems is a synchronous operation that atomically retrieves
multiple items from one or more tables (but not from indexes) in a
single account and Region. A TransactGetItems call can contain up to
100 TransactGetItem objects, each of which contains a Get structure
that specifies an item to retrieve from a table in the account and
Region. A call to TransactGetItems cannot retrieve items from tables
in more than one Amazon Web Services account or Region. The aggregate
size of the items in the transaction cannot exceed 4 MB.
DynamoDB rejects the entire TransactGetItems request if any of the
following is true:
-
A conflicting operation is in the process of updating an item to be read.
-
There is insufficient provisioned capacity for the transaction to be completed.
-
There is a user error, such as an invalid data format.
-
The aggregate size of the items in the transaction exceeded 4 MB.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
TransactGetItemsInput | TransactGetItemsInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[TransactGetItemsInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
TransactGetItemsOutput
|
An instance of |
transact_get_items
async
¶
transact_get_items(request: TransactGetItemsInput | TransactGetItemsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[TransactGetItemsInputDict]) -> TransactGetItemsOutput
TransactGetItems is a synchronous operation that atomically retrieves
multiple items from one or more tables (but not from indexes) in a
single account and Region. A TransactGetItems call can contain up to
100 TransactGetItem objects, each of which contains a Get structure
that specifies an item to retrieve from a table in the account and
Region. A call to TransactGetItems cannot retrieve items from tables
in more than one Amazon Web Services account or Region. The aggregate
size of the items in the transaction cannot exceed 4 MB.
DynamoDB rejects the entire TransactGetItems request if any of the
following is true:
-
A conflicting operation is in the process of updating an item to be read.
-
There is insufficient provisioned capacity for the transaction to be completed.
-
There is a user error, such as an invalid data format.
-
The aggregate size of the items in the transaction exceeded 4 MB.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
TransactGetItemsInput | TransactGetItemsInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[TransactGetItemsInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
TransactGetItemsOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
TransactGetItemsInputDict
¶
Bases: TypedDict
Dictionary form of TransactGetItemsInput.
Attributes¶
return_consumed_capacity
instance-attribute
¶
return_consumed_capacity: str | None
A value of TOTAL causes consumed capacity information to be returned,
and a value of NONE prevents that information from being returned. No
other value is valid.
transact_items
instance-attribute
¶
transact_items: Required[Sequence[TransactGetItem | TransactGetItemDict]]
An ordered array of up to 100 TransactGetItem objects, each of which
contains a Get structure.
TransactGetItemsInput
dataclass
¶
Bases: _SerdeShape
Dataclass for TransactGetItemsInput structure.
Attributes¶
return_consumed_capacity
class-attribute
instance-attribute
¶
return_consumed_capacity: str | None = ...
A value of TOTAL causes consumed capacity information to be returned,
and a value of NONE prevents that information from being returned. No
other value is valid.
transact_items
class-attribute
instance-attribute
¶
transact_items: list[TransactGetItem] | None = ...
An ordered array of up to 100 TransactGetItem objects, each of which
contains a Get structure.
Output¶
TransactGetItemsOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for TransactGetItemsOutput structure.
Attributes¶
consumed_capacity
class-attribute
instance-attribute
¶
consumed_capacity: list[ConsumedCapacity] | None = ...
If the ReturnConsumedCapacity value was TOTAL, this is an array of
ConsumedCapacity objects, one for each table addressed by
TransactGetItem objects in the TransactItems parameter. These
ConsumedCapacity objects report the read-capacity units consumed by
the TransactGetItems call in that table.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
responses
class-attribute
instance-attribute
¶
responses: list[ItemResponse] | None = ...
An ordered array of up to 100 ItemResponse objects, each of which
corresponds to the TransactGetItem object in the same position in the
TransactItems array. Each ItemResponse object contains a Map of the
name-value pairs that are the projected attributes of the requested
item.
If a requested item could not be retrieved, the corresponding
ItemResponse object is Null, or if the requested item has no projected
attributes, the corresponding ItemResponse object is an empty Map.