This operation allows you to perform batch reads or writes on data stored in DynamoDB, using PartiQL¶
Description¶
This operation allows you to perform batch reads or writes on data stored in DynamoDB, using PartiQL. Each read statement in a batch_execute_statement 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 .
The entire batch must consist of either read statements or write statements, you cannot mix both in one batch.
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.
Usage¶
Arguments¶
-
Statements[required] The list of PartiQL statements representing the batch to run.
-
ReturnConsumedCapacityDetermines 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
get_itemandbatch_get_item, do not access any indexes at all. In these cases, specifyingINDEXESwill only returnConsumedCapacityinformation for table(s). -TOTAL- The response includes only the aggregateConsumedCapacityfor the operation. -NONE- NoConsumedCapacitydetails are included in the response.
-
Value¶
A list with the following syntax:
list(
Responses = list(
list(
Error = list(
Code = "ConditionalCheckFailed"|"ItemCollectionSizeLimitExceeded"|"RequestLimitExceeded"|"ValidationError"|"ProvisionedThroughputExceeded"|"TransactionConflict"|"ThrottlingError"|"InternalServerError"|"ResourceNotFound"|"AccessDenied"|"DuplicateItem",
Message = "string",
Item = list(
list(
S = "string",
N = "string",
B = raw,
SS = list(
"string"
),
NS = list(
"string"
),
BS = list(
raw
),
M = list(
list()
),
L = list(
list()
),
NULL = TRUE|FALSE,
BOOL = TRUE|FALSE
)
)
),
TableName = "string",
Item = list(
list(
S = "string",
N = "string",
B = raw,
SS = list(
"string"
),
NS = list(
"string"
),
BS = list(
raw
),
M = list(
list()
),
L = list(
list()
),
NULL = TRUE|FALSE,
BOOL = TRUE|FALSE
)
)
)
),
ConsumedCapacity = list(
list(
TableName = "string",
CapacityUnits = 123.0,
ReadCapacityUnits = 123.0,
WriteCapacityUnits = 123.0,
Table = list(
ReadCapacityUnits = 123.0,
WriteCapacityUnits = 123.0,
CapacityUnits = 123.0
),
LocalSecondaryIndexes = list(
list(
ReadCapacityUnits = 123.0,
WriteCapacityUnits = 123.0,
CapacityUnits = 123.0
)
),
GlobalSecondaryIndexes = list(
list(
ReadCapacityUnits = 123.0,
WriteCapacityUnits = 123.0,
CapacityUnits = 123.0
)
),
VectorIndexes = list(
list(
VectorSearchRequestBytes = 123.0,
VectorWriteRequestBytes = 123.0
)
)
)
)
)
Request syntax¶
svc$batch_execute_statement(
Statements = list(
list(
Statement = "string",
Parameters = list(
list(
S = "string",
N = "string",
B = raw,
SS = list(
"string"
),
NS = list(
"string"
),
BS = list(
raw
),
M = list(
list()
),
L = list(
list()
),
NULL = TRUE|FALSE,
BOOL = TRUE|FALSE
)
),
ConsistentRead = TRUE|FALSE,
ReturnValuesOnConditionCheckFailure = "ALL_OLD"|"NONE"
)
),
ReturnConsumedCapacity = "INDEXES"|"TOTAL"|"NONE"
)