Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Sends a command to an Amazon QLDB ledger.
Instead of interacting directly with this API, we recommend using the QLDB driver or the QLDB shell to execute data transactions on a ledger.
- If you are working with an AWS SDK, use the QLDB driver. The driver
provides a high-level abstraction layer above this QLDB Session
data plane and manages
SendCommand
API calls for you. For information and a list of supported programming languages, see Getting started with the driver in the Amazon QLDB Developer Guide. - If you are working with the AWS Command Line Interface (AWS CLI), use the QLDB shell. The shell is a command line interface that uses the QLDB driver to interact with a ledger. For information, see Accessing Amazon QLDB using the QLDB shell.
Synopsis
- data SendCommand = SendCommand' {
- fetchPage :: Maybe FetchPageRequest
- sessionToken :: Maybe Text
- abortTransaction :: Maybe AbortTransactionRequest
- endSession :: Maybe EndSessionRequest
- startTransaction :: Maybe StartTransactionRequest
- executeStatement :: Maybe ExecuteStatementRequest
- commitTransaction :: Maybe CommitTransactionRequest
- startSession :: Maybe StartSessionRequest
- newSendCommand :: SendCommand
- sendCommand_fetchPage :: Lens' SendCommand (Maybe FetchPageRequest)
- sendCommand_sessionToken :: Lens' SendCommand (Maybe Text)
- sendCommand_abortTransaction :: Lens' SendCommand (Maybe AbortTransactionRequest)
- sendCommand_endSession :: Lens' SendCommand (Maybe EndSessionRequest)
- sendCommand_startTransaction :: Lens' SendCommand (Maybe StartTransactionRequest)
- sendCommand_executeStatement :: Lens' SendCommand (Maybe ExecuteStatementRequest)
- sendCommand_commitTransaction :: Lens' SendCommand (Maybe CommitTransactionRequest)
- sendCommand_startSession :: Lens' SendCommand (Maybe StartSessionRequest)
- data SendCommandResponse = SendCommandResponse' {
- fetchPage :: Maybe FetchPageResult
- abortTransaction :: Maybe AbortTransactionResult
- endSession :: Maybe EndSessionResult
- startTransaction :: Maybe StartTransactionResult
- executeStatement :: Maybe ExecuteStatementResult
- commitTransaction :: Maybe CommitTransactionResult
- startSession :: Maybe StartSessionResult
- httpStatus :: Int
- newSendCommandResponse :: Int -> SendCommandResponse
- sendCommandResponse_fetchPage :: Lens' SendCommandResponse (Maybe FetchPageResult)
- sendCommandResponse_abortTransaction :: Lens' SendCommandResponse (Maybe AbortTransactionResult)
- sendCommandResponse_endSession :: Lens' SendCommandResponse (Maybe EndSessionResult)
- sendCommandResponse_startTransaction :: Lens' SendCommandResponse (Maybe StartTransactionResult)
- sendCommandResponse_executeStatement :: Lens' SendCommandResponse (Maybe ExecuteStatementResult)
- sendCommandResponse_commitTransaction :: Lens' SendCommandResponse (Maybe CommitTransactionResult)
- sendCommandResponse_startSession :: Lens' SendCommandResponse (Maybe StartSessionResult)
- sendCommandResponse_httpStatus :: Lens' SendCommandResponse Int
Creating a Request
data SendCommand Source #
See: newSendCommand
smart constructor.
SendCommand' | |
|
Instances
newSendCommand :: SendCommand Source #
Create a value of SendCommand
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:fetchPage:SendCommand'
, sendCommand_fetchPage
- Command to fetch a page.
$sel:sessionToken:SendCommand'
, sendCommand_sessionToken
- Specifies the session token for the current command. A session token is
constant throughout the life of the session.
To obtain a session token, run the StartSession
command. This
SessionToken
is required for every subsequent command that is issued
during the current session.
$sel:abortTransaction:SendCommand'
, sendCommand_abortTransaction
- Command to abort the current transaction.
$sel:endSession:SendCommand'
, sendCommand_endSession
- Command to end the current session.
$sel:startTransaction:SendCommand'
, sendCommand_startTransaction
- Command to start a new transaction.
$sel:executeStatement:SendCommand'
, sendCommand_executeStatement
- Command to execute a statement in the specified transaction.
$sel:commitTransaction:SendCommand'
, sendCommand_commitTransaction
- Command to commit the specified transaction.
$sel:startSession:SendCommand'
, sendCommand_startSession
- Command to start a new session. A session token is obtained as part of
the response.
Request Lenses
sendCommand_fetchPage :: Lens' SendCommand (Maybe FetchPageRequest) Source #
Command to fetch a page.
sendCommand_sessionToken :: Lens' SendCommand (Maybe Text) Source #
Specifies the session token for the current command. A session token is constant throughout the life of the session.
To obtain a session token, run the StartSession
command. This
SessionToken
is required for every subsequent command that is issued
during the current session.
sendCommand_abortTransaction :: Lens' SendCommand (Maybe AbortTransactionRequest) Source #
Command to abort the current transaction.
sendCommand_endSession :: Lens' SendCommand (Maybe EndSessionRequest) Source #
Command to end the current session.
sendCommand_startTransaction :: Lens' SendCommand (Maybe StartTransactionRequest) Source #
Command to start a new transaction.
sendCommand_executeStatement :: Lens' SendCommand (Maybe ExecuteStatementRequest) Source #
Command to execute a statement in the specified transaction.
sendCommand_commitTransaction :: Lens' SendCommand (Maybe CommitTransactionRequest) Source #
Command to commit the specified transaction.
sendCommand_startSession :: Lens' SendCommand (Maybe StartSessionRequest) Source #
Command to start a new session. A session token is obtained as part of the response.
Destructuring the Response
data SendCommandResponse Source #
See: newSendCommandResponse
smart constructor.
SendCommandResponse' | |
|
Instances
newSendCommandResponse Source #
Create a value of SendCommandResponse
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:fetchPage:SendCommand'
, sendCommandResponse_fetchPage
- Contains the details of the fetched page.
$sel:abortTransaction:SendCommand'
, sendCommandResponse_abortTransaction
- Contains the details of the aborted transaction.
$sel:endSession:SendCommand'
, sendCommandResponse_endSession
- Contains the details of the ended session.
$sel:startTransaction:SendCommand'
, sendCommandResponse_startTransaction
- Contains the details of the started transaction.
$sel:executeStatement:SendCommand'
, sendCommandResponse_executeStatement
- Contains the details of the executed statement.
$sel:commitTransaction:SendCommand'
, sendCommandResponse_commitTransaction
- Contains the details of the committed transaction.
$sel:startSession:SendCommand'
, sendCommandResponse_startSession
- Contains the details of the started session that includes a session
token. This SessionToken
is required for every subsequent command that
is issued during the current session.
$sel:httpStatus:SendCommandResponse'
, sendCommandResponse_httpStatus
- The response's http status code.
Response Lenses
sendCommandResponse_fetchPage :: Lens' SendCommandResponse (Maybe FetchPageResult) Source #
Contains the details of the fetched page.
sendCommandResponse_abortTransaction :: Lens' SendCommandResponse (Maybe AbortTransactionResult) Source #
Contains the details of the aborted transaction.
sendCommandResponse_endSession :: Lens' SendCommandResponse (Maybe EndSessionResult) Source #
Contains the details of the ended session.
sendCommandResponse_startTransaction :: Lens' SendCommandResponse (Maybe StartTransactionResult) Source #
Contains the details of the started transaction.
sendCommandResponse_executeStatement :: Lens' SendCommandResponse (Maybe ExecuteStatementResult) Source #
Contains the details of the executed statement.
sendCommandResponse_commitTransaction :: Lens' SendCommandResponse (Maybe CommitTransactionResult) Source #
Contains the details of the committed transaction.
sendCommandResponse_startSession :: Lens' SendCommandResponse (Maybe StartSessionResult) Source #
Contains the details of the started session that includes a session
token. This SessionToken
is required for every subsequent command that
is issued during the current session.
sendCommandResponse_httpStatus :: Lens' SendCommandResponse Int Source #
The response's http status code.