Interface QldbSessionClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface QldbSessionClient extends AwsClient
Service client for accessing QLDB Session. This can be created using the staticbuilder()method.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
SendCommandAPI 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.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static QldbSessionClientBuilderbuilder()Create a builder that can be used to configure and create aQldbSessionClient.static QldbSessionClientcreate()Create aQldbSessionClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default SendCommandResponsesendCommand(Consumer<SendCommandRequest.Builder> sendCommandRequest)Sends a command to an Amazon QLDB ledger.default SendCommandResponsesendCommand(SendCommandRequest sendCommandRequest)Sends a command to an Amazon QLDB ledger.default QldbSessionServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
sendCommand
default SendCommandResponse sendCommand(SendCommandRequest sendCommandRequest) throws BadRequestException, InvalidSessionException, OccConflictException, RateExceededException, LimitExceededException, CapacityExceededException, AwsServiceException, SdkClientException, QldbSessionException
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
SendCommandAPI 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.
- Parameters:
sendCommandRequest-- Returns:
- Result of the SendCommand operation returned by the service.
- Throws:
BadRequestException- Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.InvalidSessionException- Returned if the session doesn't exist anymore because it timed out or expired.OccConflictException- Returned when a transaction cannot be written to the journal due to a failure in the verification phase of optimistic concurrency control (OCC).RateExceededException- Returned when the rate of requests exceeds the allowed throughput.LimitExceededException- Returned if a resource limit such as number of active sessions is exceeded.CapacityExceededException- Returned when the request exceeds the processing capacity of the ledger.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.QldbSessionException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
-
sendCommand
default SendCommandResponse sendCommand(Consumer<SendCommandRequest.Builder> sendCommandRequest) throws BadRequestException, InvalidSessionException, OccConflictException, RateExceededException, LimitExceededException, CapacityExceededException, AwsServiceException, SdkClientException, QldbSessionException
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
SendCommandAPI 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.
This is a convenience which creates an instance of the
SendCommandRequest.Builderavoiding the need to create one manually viaSendCommandRequest.builder()- Parameters:
sendCommandRequest- AConsumerthat will call methods onSendCommandRequest.Builderto create a request.- Returns:
- Result of the SendCommand operation returned by the service.
- Throws:
BadRequestException- Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.InvalidSessionException- Returned if the session doesn't exist anymore because it timed out or expired.OccConflictException- Returned when a transaction cannot be written to the journal due to a failure in the verification phase of optimistic concurrency control (OCC).RateExceededException- Returned when the rate of requests exceeds the allowed throughput.LimitExceededException- Returned if a resource limit such as number of active sessions is exceeded.CapacityExceededException- Returned when the request exceeds the processing capacity of the ledger.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.QldbSessionException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
-
create
static QldbSessionClient create()
Create aQldbSessionClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static QldbSessionClientBuilder builder()
Create a builder that can be used to configure and create aQldbSessionClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default QldbSessionServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-