Interface DsqlAsyncClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
builder() method.The asynchronous client performs non-blocking I/O when configured with any
SdkAsyncHttpClient supported in the SDK. However, full non-blocking is not guaranteed as the async client may
perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API
call.
This is an interface reference for Amazon Aurora DSQL. It contains documentation for one of the programming or command line interfaces you can use to manage Amazon Aurora DSQL.
Amazon Aurora DSQL is a serverless, distributed SQL database suitable for workloads of any size. Aurora DSQL is available in both single-Region and multi-Region configurations, so your clusters and databases are always available even if an Availability Zone or an Amazon Web Services Region are unavailable. Aurora DSQL lets you focus on using your data to acquire new insights for your business and customers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic DsqlAsyncClientBuilderbuilder()Create a builder that can be used to configure and create aDsqlAsyncClient.static DsqlAsyncClientcreate()Create aDsqlAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CompletableFuture<CreateClusterResponse> createCluster(Consumer<CreateClusterRequest.Builder> createClusterRequest) Creates a cluster in Amazon Aurora DSQL.default CompletableFuture<CreateClusterResponse> createCluster(CreateClusterRequest createClusterRequest) Creates a cluster in Amazon Aurora DSQL.createMultiRegionClusters(Consumer<CreateMultiRegionClustersRequest.Builder> createMultiRegionClustersRequest) Creates multi-Region clusters in Amazon Aurora DSQL.createMultiRegionClusters(CreateMultiRegionClustersRequest createMultiRegionClustersRequest) Creates multi-Region clusters in Amazon Aurora DSQL.default CompletableFuture<DeleteClusterResponse> deleteCluster(Consumer<DeleteClusterRequest.Builder> deleteClusterRequest) Deletes a cluster in Amazon Aurora DSQL.default CompletableFuture<DeleteClusterResponse> deleteCluster(DeleteClusterRequest deleteClusterRequest) Deletes a cluster in Amazon Aurora DSQL.deleteMultiRegionClusters(Consumer<DeleteMultiRegionClustersRequest.Builder> deleteMultiRegionClustersRequest) Deletes a multi-Region cluster in Amazon Aurora DSQL.deleteMultiRegionClusters(DeleteMultiRegionClustersRequest deleteMultiRegionClustersRequest) Deletes a multi-Region cluster in Amazon Aurora DSQL.default CompletableFuture<GetClusterResponse> getCluster(Consumer<GetClusterRequest.Builder> getClusterRequest) Retrieves information about a cluster.default CompletableFuture<GetClusterResponse> getCluster(GetClusterRequest getClusterRequest) Retrieves information about a cluster.default CompletableFuture<ListClustersResponse> listClusters(Consumer<ListClustersRequest.Builder> listClustersRequest) Retrieves information about a list of clusters.default CompletableFuture<ListClustersResponse> listClusters(ListClustersRequest listClustersRequest) Retrieves information about a list of clusters.default ListClustersPublisherlistClustersPaginator(Consumer<ListClustersRequest.Builder> listClustersRequest) This is a variant oflistClusters(software.amazon.awssdk.services.dsql.model.ListClustersRequest)operation.default ListClustersPublisherlistClustersPaginator(ListClustersRequest listClustersRequest) This is a variant oflistClusters(software.amazon.awssdk.services.dsql.model.ListClustersRequest)operation.listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists all of the tags for a resource.listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Lists all of the tags for a resource.default DsqlServiceClientConfigurationThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationdefault CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Tags a resource with a map of key and value pairs.default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest) Tags a resource with a map of key and value pairs.default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes a tag from a resource.default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes a tag from a resource.default CompletableFuture<UpdateClusterResponse> updateCluster(Consumer<UpdateClusterRequest.Builder> updateClusterRequest) Updates a cluster.default CompletableFuture<UpdateClusterResponse> updateCluster(UpdateClusterRequest updateClusterRequest) Updates a cluster.default DsqlUtilitiesCreates an instance ofDsqlUtilitiesobject with the configuration set on this client.default DsqlAsyncWaiterwaiter()Create an instance ofDsqlAsyncWaiterusing this client.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
utilities
Creates an instance ofDsqlUtilitiesobject with the configuration set on this client. -
createCluster
default CompletableFuture<CreateClusterResponse> createCluster(CreateClusterRequest createClusterRequest) Creates a cluster in Amazon Aurora DSQL.
- Parameters:
createClusterRequest-- Returns:
- A Java Future containing the result of the CreateCluster operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ServiceQuotaExceededException The service limit was exceeded.
- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ConflictException The submitted action has conflicts.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createCluster
default CompletableFuture<CreateClusterResponse> createCluster(Consumer<CreateClusterRequest.Builder> createClusterRequest) Creates a cluster in Amazon Aurora DSQL.
This is a convenience which creates an instance of the
CreateClusterRequest.Builderavoiding the need to create one manually viaCreateClusterRequest.builder()- Parameters:
createClusterRequest- AConsumerthat will call methods onCreateClusterRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CreateCluster operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ServiceQuotaExceededException The service limit was exceeded.
- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ConflictException The submitted action has conflicts.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createMultiRegionClusters
default CompletableFuture<CreateMultiRegionClustersResponse> createMultiRegionClusters(CreateMultiRegionClustersRequest createMultiRegionClustersRequest) Creates multi-Region clusters in Amazon Aurora DSQL. Multi-Region clusters require a linked Region list, which is an array of the Regions in which you want to create linked clusters. Multi-Region clusters require a witness Region, which participates in quorum in failure scenarios.
- Parameters:
createMultiRegionClustersRequest-- Returns:
- A Java Future containing the result of the CreateMultiRegionClusters operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ServiceQuotaExceededException The service limit was exceeded.
- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ConflictException The submitted action has conflicts.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createMultiRegionClusters
default CompletableFuture<CreateMultiRegionClustersResponse> createMultiRegionClusters(Consumer<CreateMultiRegionClustersRequest.Builder> createMultiRegionClustersRequest) Creates multi-Region clusters in Amazon Aurora DSQL. Multi-Region clusters require a linked Region list, which is an array of the Regions in which you want to create linked clusters. Multi-Region clusters require a witness Region, which participates in quorum in failure scenarios.
This is a convenience which creates an instance of the
CreateMultiRegionClustersRequest.Builderavoiding the need to create one manually viaCreateMultiRegionClustersRequest.builder()- Parameters:
createMultiRegionClustersRequest- AConsumerthat will call methods onCreateMultiRegionClustersRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CreateMultiRegionClusters operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ServiceQuotaExceededException The service limit was exceeded.
- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ConflictException The submitted action has conflicts.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteCluster
default CompletableFuture<DeleteClusterResponse> deleteCluster(DeleteClusterRequest deleteClusterRequest) Deletes a cluster in Amazon Aurora DSQL.
- Parameters:
deleteClusterRequest-- Returns:
- A Java Future containing the result of the DeleteCluster operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- ConflictException The submitted action has conflicts.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteCluster
default CompletableFuture<DeleteClusterResponse> deleteCluster(Consumer<DeleteClusterRequest.Builder> deleteClusterRequest) Deletes a cluster in Amazon Aurora DSQL.
This is a convenience which creates an instance of the
DeleteClusterRequest.Builderavoiding the need to create one manually viaDeleteClusterRequest.builder()- Parameters:
deleteClusterRequest- AConsumerthat will call methods onDeleteClusterRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DeleteCluster operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- ConflictException The submitted action has conflicts.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteMultiRegionClusters
default CompletableFuture<DeleteMultiRegionClustersResponse> deleteMultiRegionClusters(DeleteMultiRegionClustersRequest deleteMultiRegionClustersRequest) Deletes a multi-Region cluster in Amazon Aurora DSQL.
- Parameters:
deleteMultiRegionClustersRequest-- Returns:
- A Java Future containing the result of the DeleteMultiRegionClusters operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- ConflictException The submitted action has conflicts.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteMultiRegionClusters
default CompletableFuture<DeleteMultiRegionClustersResponse> deleteMultiRegionClusters(Consumer<DeleteMultiRegionClustersRequest.Builder> deleteMultiRegionClustersRequest) Deletes a multi-Region cluster in Amazon Aurora DSQL.
This is a convenience which creates an instance of the
DeleteMultiRegionClustersRequest.Builderavoiding the need to create one manually viaDeleteMultiRegionClustersRequest.builder()- Parameters:
deleteMultiRegionClustersRequest- AConsumerthat will call methods onDeleteMultiRegionClustersRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DeleteMultiRegionClusters operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- ConflictException The submitted action has conflicts.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCluster
Retrieves information about a cluster.
- Parameters:
getClusterRequest-- Returns:
- A Java Future containing the result of the GetCluster operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCluster
default CompletableFuture<GetClusterResponse> getCluster(Consumer<GetClusterRequest.Builder> getClusterRequest) Retrieves information about a cluster.
This is a convenience which creates an instance of the
GetClusterRequest.Builderavoiding the need to create one manually viaGetClusterRequest.builder()- Parameters:
getClusterRequest- AConsumerthat will call methods onGetClusterRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetCluster operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listClusters
default CompletableFuture<ListClustersResponse> listClusters(ListClustersRequest listClustersRequest) Retrieves information about a list of clusters.
- Parameters:
listClustersRequest-- Returns:
- A Java Future containing the result of the ListClusters operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listClusters
default CompletableFuture<ListClustersResponse> listClusters(Consumer<ListClustersRequest.Builder> listClustersRequest) Retrieves information about a list of clusters.
This is a convenience which creates an instance of the
ListClustersRequest.Builderavoiding the need to create one manually viaListClustersRequest.builder()- Parameters:
listClustersRequest- AConsumerthat will call methods onListClustersRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListClusters operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listClustersPaginator
This is a variant of
listClusters(software.amazon.awssdk.services.dsql.model.ListClustersRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.dsql.paginators.ListClustersPublisher publisher = client.listClustersPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.dsql.paginators.ListClustersPublisher publisher = client.listClustersPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.dsql.model.ListClustersResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.dsql.model.ListClustersResponse response) { //... }; });Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listClusters(software.amazon.awssdk.services.dsql.model.ListClustersRequest)operation.- Parameters:
listClustersRequest-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listClustersPaginator
default ListClustersPublisher listClustersPaginator(Consumer<ListClustersRequest.Builder> listClustersRequest) This is a variant of
listClusters(software.amazon.awssdk.services.dsql.model.ListClustersRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.dsql.paginators.ListClustersPublisher publisher = client.listClustersPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.dsql.paginators.ListClustersPublisher publisher = client.listClustersPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.dsql.model.ListClustersResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.dsql.model.ListClustersResponse response) { //... }; });Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listClusters(software.amazon.awssdk.services.dsql.model.ListClustersRequest)operation.
This is a convenience which creates an instance of the
ListClustersRequest.Builderavoiding the need to create one manually viaListClustersRequest.builder()- Parameters:
listClustersRequest- AConsumerthat will call methods onListClustersRequest.Builderto create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Lists all of the tags for a resource.
- Parameters:
listTagsForResourceRequest-- Returns:
- A Java Future containing the result of the ListTagsForResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists all of the tags for a resource.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListTagsForResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
Tags a resource with a map of key and value pairs.
- Parameters:
tagResourceRequest-- Returns:
- A Java Future containing the result of the TagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ServiceQuotaExceededException The service limit was exceeded.
- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Tags a resource with a map of key and value pairs.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the TagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ServiceQuotaExceededException The service limit was exceeded.
- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes a tag from a resource.
- Parameters:
untagResourceRequest-- Returns:
- A Java Future containing the result of the UntagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes a tag from a resource.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UntagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateCluster
default CompletableFuture<UpdateClusterResponse> updateCluster(UpdateClusterRequest updateClusterRequest) Updates a cluster.
- Parameters:
updateClusterRequest-- Returns:
- A Java Future containing the result of the UpdateCluster operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- ConflictException The submitted action has conflicts.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateCluster
default CompletableFuture<UpdateClusterResponse> updateCluster(Consumer<UpdateClusterRequest.Builder> updateClusterRequest) Updates a cluster.
This is a convenience which creates an instance of the
UpdateClusterRequest.Builderavoiding the need to create one manually viaUpdateClusterRequest.builder()- Parameters:
updateClusterRequest- AConsumerthat will call methods onUpdateClusterRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UpdateCluster operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ThrottlingException The request was denied due to request throttling.
- AccessDeniedException You do not have sufficient access to perform this action.
- ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ResourceNotFoundException The resource could not be found.
- ConflictException The submitted action has conflicts.
- 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.
- DsqlException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
waiter
Create an instance ofDsqlAsyncWaiterusing this client.Waiters created via this method are managed by the SDK and resources will be released when the service client is closed.
- Returns:
- an instance of
DsqlAsyncWaiter
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aDsqlAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aDsqlAsyncClient.
-