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 |
- Service Configuration
- Errors
- Waiters
- Operations
- Types
- AbortTransactionRequest
- AbortTransactionResult
- CommitTransactionRequest
- CommitTransactionResult
- EndSessionRequest
- EndSessionResult
- ExecuteStatementRequest
- ExecuteStatementResult
- FetchPageRequest
- FetchPageResult
- IOUsage
- Page
- StartSessionRequest
- StartSessionResult
- StartTransactionRequest
- StartTransactionResult
- TimingInformation
- ValueHolder
Derived from API version 2019-07-11
of the AWS service descriptions, licensed under Apache 2.0.
The transactional data APIs for Amazon QLDB
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
- defaultService :: Service
- _InvalidSessionException :: AsError a => Getting (First ServiceError) a ServiceError
- _CapacityExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- _OccConflictException :: AsError a => Getting (First ServiceError) a ServiceError
- _RateExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- _BadRequestException :: AsError a => Getting (First ServiceError) a ServiceError
- _LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- data SendCommand = SendCommand' (Maybe FetchPageRequest) (Maybe Text) (Maybe AbortTransactionRequest) (Maybe EndSessionRequest) (Maybe StartTransactionRequest) (Maybe ExecuteStatementRequest) (Maybe CommitTransactionRequest) (Maybe StartSessionRequest)
- newSendCommand :: SendCommand
- data SendCommandResponse = SendCommandResponse' (Maybe FetchPageResult) (Maybe AbortTransactionResult) (Maybe EndSessionResult) (Maybe StartTransactionResult) (Maybe ExecuteStatementResult) (Maybe CommitTransactionResult) (Maybe StartSessionResult) Int
- newSendCommandResponse :: Int -> SendCommandResponse
- data AbortTransactionRequest = AbortTransactionRequest' {
- newAbortTransactionRequest :: AbortTransactionRequest
- data AbortTransactionResult = AbortTransactionResult' (Maybe TimingInformation)
- newAbortTransactionResult :: AbortTransactionResult
- data CommitTransactionRequest = CommitTransactionRequest' Text Base64
- newCommitTransactionRequest :: Text -> ByteString -> CommitTransactionRequest
- data CommitTransactionResult = CommitTransactionResult' (Maybe TimingInformation) (Maybe IOUsage) (Maybe Base64) (Maybe Text)
- newCommitTransactionResult :: CommitTransactionResult
- data EndSessionRequest = EndSessionRequest' {
- newEndSessionRequest :: EndSessionRequest
- data EndSessionResult = EndSessionResult' (Maybe TimingInformation)
- newEndSessionResult :: EndSessionResult
- data ExecuteStatementRequest = ExecuteStatementRequest' (Maybe [ValueHolder]) Text Text
- newExecuteStatementRequest :: Text -> Text -> ExecuteStatementRequest
- data ExecuteStatementResult = ExecuteStatementResult' (Maybe TimingInformation) (Maybe IOUsage) (Maybe Page)
- newExecuteStatementResult :: ExecuteStatementResult
- data FetchPageRequest = FetchPageRequest' Text Text
- newFetchPageRequest :: Text -> Text -> FetchPageRequest
- data FetchPageResult = FetchPageResult' (Maybe TimingInformation) (Maybe IOUsage) (Maybe Page)
- newFetchPageResult :: FetchPageResult
- data IOUsage = IOUsage' (Maybe Integer) (Maybe Integer)
- newIOUsage :: IOUsage
- data Page = Page' (Maybe Text) (Maybe [ValueHolder])
- newPage :: Page
- data StartSessionRequest = StartSessionRequest' Text
- newStartSessionRequest :: Text -> StartSessionRequest
- data StartSessionResult = StartSessionResult' (Maybe TimingInformation) (Maybe Text)
- newStartSessionResult :: StartSessionResult
- data StartTransactionRequest = StartTransactionRequest' {
- newStartTransactionRequest :: StartTransactionRequest
- data StartTransactionResult = StartTransactionResult' (Maybe TimingInformation) (Maybe Text)
- newStartTransactionResult :: StartTransactionResult
- data TimingInformation = TimingInformation' (Maybe Integer)
- newTimingInformation :: TimingInformation
- data ValueHolder = ValueHolder' (Maybe Text) (Maybe Base64)
- newValueHolder :: ValueHolder
Service Configuration
defaultService :: Service Source #
API version 2019-07-11
of the Amazon QLDB Session SDK configuration.
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by QLDBSession
.
InvalidSessionException
_InvalidSessionException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned if the session doesn't exist anymore because it timed out or expired.
CapacityExceededException
_CapacityExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned when the request exceeds the processing capacity of the ledger.
OccConflictException
_OccConflictException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned when a transaction cannot be written to the journal due to a failure in the verification phase of optimistic concurrency control (OCC).
RateExceededException
_RateExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned when the rate of requests exceeds the allowed throughput.
BadRequestException
_BadRequestException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.
LimitExceededException
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Returned if a resource limit such as number of active sessions is exceeded.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
SendCommand
data SendCommand Source #
See: newSendCommand
smart constructor.
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.
data SendCommandResponse Source #
See: newSendCommandResponse
smart constructor.
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.
Types
AbortTransactionRequest
data AbortTransactionRequest Source #
Contains the details of the transaction to abort.
See: newAbortTransactionRequest
smart constructor.
Instances
newAbortTransactionRequest :: AbortTransactionRequest Source #
Create a value of AbortTransactionRequest
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
AbortTransactionResult
data AbortTransactionResult Source #
Contains the details of the aborted transaction.
See: newAbortTransactionResult
smart constructor.
Instances
newAbortTransactionResult :: AbortTransactionResult Source #
Create a value of AbortTransactionResult
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:timingInformation:AbortTransactionResult'
, abortTransactionResult_timingInformation
- Contains server-side performance information for the command.
CommitTransactionRequest
data CommitTransactionRequest Source #
Contains the details of the transaction to commit.
See: newCommitTransactionRequest
smart constructor.
Instances
newCommitTransactionRequest Source #
Create a value of CommitTransactionRequest
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:transactionId:CommitTransactionRequest'
, commitTransactionRequest_transactionId
- Specifies the transaction ID of the transaction to commit.
$sel:commitDigest:CommitTransactionRequest'
, commitTransactionRequest_commitDigest
- Specifies the commit digest for the transaction to commit. For every
active transaction, the commit digest must be passed. QLDB validates
CommitDigest
and rejects the commit with an error if the digest
computed on the client does not match the digest computed by QLDB.
The purpose of the CommitDigest
parameter is to ensure that QLDB
commits a transaction if and only if the server has processed the exact
set of statements sent by the client, in the same order that client sent
them, and with no duplicates.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.
CommitTransactionResult
data CommitTransactionResult Source #
Contains the details of the committed transaction.
See: newCommitTransactionResult
smart constructor.
Instances
newCommitTransactionResult :: CommitTransactionResult Source #
Create a value of CommitTransactionResult
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:timingInformation:CommitTransactionResult'
, commitTransactionResult_timingInformation
- Contains server-side performance information for the command.
$sel:consumedIOs:CommitTransactionResult'
, commitTransactionResult_consumedIOs
- Contains metrics about the number of I/O requests that were consumed.
$sel:commitDigest:CommitTransactionResult'
, commitTransactionResult_commitDigest
- The commit digest of the committed transaction.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.
$sel:transactionId:CommitTransactionResult'
, commitTransactionResult_transactionId
- The transaction ID of the committed transaction.
EndSessionRequest
data EndSessionRequest Source #
Specifies a request to end the session.
See: newEndSessionRequest
smart constructor.
Instances
newEndSessionRequest :: EndSessionRequest Source #
Create a value of EndSessionRequest
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
EndSessionResult
data EndSessionResult Source #
Contains the details of the ended session.
See: newEndSessionResult
smart constructor.
Instances
newEndSessionResult :: EndSessionResult Source #
Create a value of EndSessionResult
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:timingInformation:EndSessionResult'
, endSessionResult_timingInformation
- Contains server-side performance information for the command.
ExecuteStatementRequest
data ExecuteStatementRequest Source #
Specifies a request to execute a statement.
See: newExecuteStatementRequest
smart constructor.
Instances
newExecuteStatementRequest Source #
:: Text | |
-> Text | |
-> ExecuteStatementRequest |
Create a value of ExecuteStatementRequest
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:parameters:ExecuteStatementRequest'
, executeStatementRequest_parameters
- Specifies the parameters for the parameterized statement in the request.
$sel:transactionId:ExecuteStatementRequest'
, executeStatementRequest_transactionId
- Specifies the transaction ID of the request.
$sel:statement:ExecuteStatementRequest'
, executeStatementRequest_statement
- Specifies the statement of the request.
ExecuteStatementResult
data ExecuteStatementResult Source #
Contains the details of the executed statement.
See: newExecuteStatementResult
smart constructor.
Instances
newExecuteStatementResult :: ExecuteStatementResult Source #
Create a value of ExecuteStatementResult
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:timingInformation:ExecuteStatementResult'
, executeStatementResult_timingInformation
- Contains server-side performance information for the command.
$sel:consumedIOs:ExecuteStatementResult'
, executeStatementResult_consumedIOs
- Contains metrics about the number of I/O requests that were consumed.
$sel:firstPage:ExecuteStatementResult'
, executeStatementResult_firstPage
- Contains the details of the first fetched page.
FetchPageRequest
data FetchPageRequest Source #
Specifies the details of the page to be fetched.
See: newFetchPageRequest
smart constructor.
Instances
:: Text | |
-> Text | |
-> FetchPageRequest |
Create a value of FetchPageRequest
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:transactionId:FetchPageRequest'
, fetchPageRequest_transactionId
- Specifies the transaction ID of the page to be fetched.
$sel:nextPageToken:FetchPageRequest'
, fetchPageRequest_nextPageToken
- Specifies the next page token of the page to be fetched.
FetchPageResult
data FetchPageResult Source #
Contains the page that was fetched.
See: newFetchPageResult
smart constructor.
Instances
newFetchPageResult :: FetchPageResult Source #
Create a value of FetchPageResult
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:timingInformation:FetchPageResult'
, fetchPageResult_timingInformation
- Contains server-side performance information for the command.
$sel:consumedIOs:FetchPageResult'
, fetchPageResult_consumedIOs
- Contains metrics about the number of I/O requests that were consumed.
$sel:page:FetchPageResult'
, fetchPageResult_page
- Contains details of the fetched page.
IOUsage
Contains I/O usage metrics for a command that was invoked.
See: newIOUsage
smart constructor.
Instances
Eq IOUsage Source # | |
Read IOUsage Source # | |
Show IOUsage Source # | |
Generic IOUsage Source # | |
NFData IOUsage Source # | |
Defined in Amazonka.QLDBSession.Types.IOUsage | |
Hashable IOUsage Source # | |
Defined in Amazonka.QLDBSession.Types.IOUsage | |
FromJSON IOUsage Source # | |
type Rep IOUsage Source # | |
Defined in Amazonka.QLDBSession.Types.IOUsage type Rep IOUsage = D1 ('MetaData "IOUsage" "Amazonka.QLDBSession.Types.IOUsage" "libZSservicesZSamazonka-qldb-sessionZSamazonka-qldb-session" 'False) (C1 ('MetaCons "IOUsage'" 'PrefixI 'True) (S1 ('MetaSel ('Just "readIOs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "writeIOs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)))) |
newIOUsage :: IOUsage Source #
Create a value of IOUsage
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:readIOs:IOUsage'
, iOUsage_readIOs
- The number of read I/O requests that the command made.
$sel:writeIOs:IOUsage'
, iOUsage_writeIOs
- The number of write I/O requests that the command made.
Page
Contains details of the fetched page.
See: newPage
smart constructor.
Page' (Maybe Text) (Maybe [ValueHolder]) |
Instances
Eq Page Source # | |
Read Page Source # | |
Show Page Source # | |
Generic Page Source # | |
NFData Page Source # | |
Defined in Amazonka.QLDBSession.Types.Page | |
Hashable Page Source # | |
Defined in Amazonka.QLDBSession.Types.Page | |
FromJSON Page Source # | |
type Rep Page Source # | |
Defined in Amazonka.QLDBSession.Types.Page type Rep Page = D1 ('MetaData "Page" "Amazonka.QLDBSession.Types.Page" "libZSservicesZSamazonka-qldb-sessionZSamazonka-qldb-session" 'False) (C1 ('MetaCons "Page'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextPageToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "values") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ValueHolder])))) |
Create a value of Page
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:nextPageToken:Page'
, page_nextPageToken
- The token of the next page.
$sel:values:Page'
, page_values
- A structure that contains values in multiple encoding formats.
StartSessionRequest
data StartSessionRequest Source #
Specifies a request to start a new session.
See: newStartSessionRequest
smart constructor.
Instances
newStartSessionRequest Source #
Create a value of StartSessionRequest
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:ledgerName:StartSessionRequest'
, startSessionRequest_ledgerName
- The name of the ledger to start a new session against.
StartSessionResult
data StartSessionResult Source #
Contains the details of the started session.
See: newStartSessionResult
smart constructor.
Instances
newStartSessionResult :: StartSessionResult Source #
Create a value of StartSessionResult
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:timingInformation:StartSessionResult'
, startSessionResult_timingInformation
- Contains server-side performance information for the command.
$sel:sessionToken:StartSessionResult'
, startSessionResult_sessionToken
- Session token of the started session. This SessionToken
is required
for every subsequent command that is issued during the current session.
StartTransactionRequest
data StartTransactionRequest Source #
Specifies a request to start a transaction.
See: newStartTransactionRequest
smart constructor.
Instances
newStartTransactionRequest :: StartTransactionRequest Source #
Create a value of StartTransactionRequest
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
StartTransactionResult
data StartTransactionResult Source #
Contains the details of the started transaction.
See: newStartTransactionResult
smart constructor.
Instances
newStartTransactionResult :: StartTransactionResult Source #
Create a value of StartTransactionResult
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:timingInformation:StartTransactionResult'
, startTransactionResult_timingInformation
- Contains server-side performance information for the command.
$sel:transactionId:StartTransactionResult'
, startTransactionResult_transactionId
- The transaction ID of the started transaction.
TimingInformation
data TimingInformation Source #
Contains server-side performance information for a command. Amazon QLDB captures timing information between the times when it receives the request and when it sends the corresponding response.
See: newTimingInformation
smart constructor.
Instances
newTimingInformation :: TimingInformation Source #
Create a value of TimingInformation
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:processingTimeMilliseconds:TimingInformation'
, timingInformation_processingTimeMilliseconds
- The amount of time that QLDB spent on processing the command, measured
in milliseconds.
ValueHolder
data ValueHolder Source #
A structure that can contain a value in multiple encoding formats.
See: newValueHolder
smart constructor.
ValueHolder' (Maybe Text) (Maybe Base64) |
Instances
newValueHolder :: ValueHolder Source #
Create a value of ValueHolder
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:ionText:ValueHolder'
, valueHolder_ionText
- An Amazon Ion plaintext value contained in a ValueHolder
structure.
$sel:ionBinary:ValueHolder'
, valueHolder_ionBinary
- An Amazon Ion binary value contained in a ValueHolder
structure.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.