batch_execute_statement¶
Operation¶
batch_execute_statement
¶
batch_execute_statement(request: BatchExecuteStatementInput | BatchExecuteStatementInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[BatchExecuteStatementInputDict]) -> BatchExecuteStatementOutput
This operation allows you to perform batch reads or writes on data
stored in DynamoDB, using PartiQL. Each read statement in a
BatchExecuteStatement must specify an equality condition on all key
attributes. This enforces that each SELECT statement in a batch
returns at most a single item. For more information, see Running batch
operations with PartiQL for
DynamoDB
.
Note
The entire batch must consist of either read statements or write statements, you cannot mix both in one batch.
Warning:
A HTTP 200 response does not mean that all statements in the
BatchExecuteStatement succeeded. Error details for individual statements
can be found under the
Error
field of the BatchStatementResponse for each statement.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
BatchExecuteStatementInput | BatchExecuteStatementInputDict | 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[BatchExecuteStatementInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
BatchExecuteStatementOutput
|
An instance of |
batch_execute_statement
async
¶
batch_execute_statement(request: BatchExecuteStatementInput | BatchExecuteStatementInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[BatchExecuteStatementInputDict]) -> BatchExecuteStatementOutput
This operation allows you to perform batch reads or writes on data
stored in DynamoDB, using PartiQL. Each read statement in a
BatchExecuteStatement must specify an equality condition on all key
attributes. This enforces that each SELECT statement in a batch
returns at most a single item. For more information, see Running batch
operations with PartiQL for
DynamoDB
.
Note
The entire batch must consist of either read statements or write statements, you cannot mix both in one batch.
Warning:
A HTTP 200 response does not mean that all statements in the
BatchExecuteStatement succeeded. Error details for individual statements
can be found under the
Error
field of the BatchStatementResponse for each statement.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
BatchExecuteStatementInput | BatchExecuteStatementInputDict | 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[BatchExecuteStatementInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
BatchExecuteStatementOutput
|
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.
BatchExecuteStatementInputDict
¶
Bases: TypedDict
Dictionary form of BatchExecuteStatementInput.
Attributes¶
return_consumed_capacity
instance-attribute
¶
return_consumed_capacity: str | None
Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.
Note that some operations, such as GetItem and BatchGetItem, do
not access any indexes at all. In these cases, specifying INDEXES
will only return ConsumedCapacity information for table(s).
-
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
statements
instance-attribute
¶
statements: Required[Sequence[BatchStatementRequest | BatchStatementRequestDict]]
The list of PartiQL statements representing the batch to run.
BatchExecuteStatementInput
dataclass
¶
Bases: _SerdeShape
Dataclass for BatchExecuteStatementInput structure.
Attributes¶
return_consumed_capacity
class-attribute
instance-attribute
¶
return_consumed_capacity: str | None = ...
Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
INDEXES- The response includes the aggregateConsumedCapacityfor the operation, together withConsumedCapacityfor each table and secondary index that was accessed.
Note that some operations, such as GetItem and BatchGetItem, do
not access any indexes at all. In these cases, specifying INDEXES
will only return ConsumedCapacity information for table(s).
-
TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -
NONE- NoConsumedCapacitydetails are included in the response.
statements
class-attribute
instance-attribute
¶
statements: list[BatchStatementRequest] | None = ...
The list of PartiQL statements representing the batch to run.
Output¶
BatchExecuteStatementOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for BatchExecuteStatementOutput structure.
Attributes¶
consumed_capacity
class-attribute
instance-attribute
¶
consumed_capacity: list[ConsumedCapacity] | None = ...
The capacity units consumed by the entire operation. The values of the list are ordered according to the ordering of the statements.
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[BatchStatementResponse] | None = ...
The response to each PartiQL statement in the batch. The values of the list are ordered according to the ordering of the request statements.