Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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.
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.
Synopsis
- data BatchExecuteStatement = BatchExecuteStatement' {}
- newBatchExecuteStatement :: NonEmpty BatchStatementRequest -> BatchExecuteStatement
- batchExecuteStatement_returnConsumedCapacity :: Lens' BatchExecuteStatement (Maybe ReturnConsumedCapacity)
- batchExecuteStatement_statements :: Lens' BatchExecuteStatement (NonEmpty BatchStatementRequest)
- data BatchExecuteStatementResponse = BatchExecuteStatementResponse' {}
- newBatchExecuteStatementResponse :: Int -> BatchExecuteStatementResponse
- batchExecuteStatementResponse_consumedCapacity :: Lens' BatchExecuteStatementResponse (Maybe [ConsumedCapacity])
- batchExecuteStatementResponse_responses :: Lens' BatchExecuteStatementResponse (Maybe [BatchStatementResponse])
- batchExecuteStatementResponse_httpStatus :: Lens' BatchExecuteStatementResponse Int
Creating a Request
data BatchExecuteStatement Source #
See: newBatchExecuteStatement
smart constructor.
BatchExecuteStatement' | |
|
Instances
newBatchExecuteStatement Source #
Create a value of BatchExecuteStatement
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:returnConsumedCapacity:BatchExecuteStatement'
, batchExecuteStatement_returnConsumedCapacity
- Undocumented member.
$sel:statements:BatchExecuteStatement'
, batchExecuteStatement_statements
- The list of PartiQL statements representing the batch to run.
Request Lenses
batchExecuteStatement_returnConsumedCapacity :: Lens' BatchExecuteStatement (Maybe ReturnConsumedCapacity) Source #
Undocumented member.
batchExecuteStatement_statements :: Lens' BatchExecuteStatement (NonEmpty BatchStatementRequest) Source #
The list of PartiQL statements representing the batch to run.
Destructuring the Response
data BatchExecuteStatementResponse Source #
See: newBatchExecuteStatementResponse
smart constructor.
BatchExecuteStatementResponse' | |
|
Instances
newBatchExecuteStatementResponse Source #
Create a value of BatchExecuteStatementResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:consumedCapacity:BatchExecuteStatementResponse'
, batchExecuteStatementResponse_consumedCapacity
- The capacity units consumed by the entire operation. The values of the
list are ordered according to the ordering of the statements.
$sel:responses:BatchExecuteStatementResponse'
, batchExecuteStatementResponse_responses
- The response to each PartiQL statement in the batch.
$sel:httpStatus:BatchExecuteStatementResponse'
, batchExecuteStatementResponse_httpStatus
- The response's http status code.
Response Lenses
batchExecuteStatementResponse_consumedCapacity :: Lens' BatchExecuteStatementResponse (Maybe [ConsumedCapacity]) Source #
The capacity units consumed by the entire operation. The values of the list are ordered according to the ordering of the statements.
batchExecuteStatementResponse_responses :: Lens' BatchExecuteStatementResponse (Maybe [BatchStatementResponse]) Source #
The response to each PartiQL statement in the batch.
batchExecuteStatementResponse_httpStatus :: Lens' BatchExecuteStatementResponse Int Source #
The response's http status code.