Interface DsqlAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface DsqlAsyncClient extends AwsClient
Service client for accessing Amazon Aurora DSQL asynchronously. This can be created using the static 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. 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. lets you focus on using your data to acquire new insights for your business and customers.

  • Field Details

  • Method Details

    • utilities

      default DsqlUtilities utilities()
      Creates an instance of DsqlUtilities object with the configuration set on this client.
    • createCluster

      default CompletableFuture<CreateClusterResponse> createCluster(CreateClusterRequest createClusterRequest)

      The CreateCluster API allows you to create both single-region clusters and multi-Region clusters. With the addition of the multiRegionProperties parameter, you can create a cluster with witness Region support and establish peer relationships with clusters in other Regions during creation.

      Creating multi-Region clusters requires additional IAM permissions beyond those needed for single-Region clusters, as detailed in the Required permissions section below.

      Required permissions

      dsql:CreateCluster

      Required to create a cluster.

      Resources: arn:aws:dsql:region:account-id:cluster/*

      dsql:TagResource

      Permission to add tags to a resource.

      Resources: arn:aws:dsql:region:account-id:cluster/*

      dsql:PutMultiRegionProperties

      Permission to configure multi-region properties for a cluster.

      Resources: arn:aws:dsql:region:account-id:cluster/*

      dsql:AddPeerCluster

      When specifying multiRegionProperties.clusters, permission to add peer clusters.

      Resources:

      • Local cluster: arn:aws:dsql:region:account-id:cluster/*

      • Each peer cluster: exact ARN of each specified peer cluster

      dsql:PutWitnessRegion

      When specifying multiRegionProperties.witnessRegion, permission to set a witness Region. This permission is checked both in the cluster Region and in the witness Region.

      Resources: arn:aws:dsql:region:account-id:cluster/*

      Condition Keys: dsql:WitnessRegion (matching the specified witness region)

      • The witness Region specified in multiRegionProperties.witnessRegion cannot be the same as the cluster's Region.

      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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ServiceQuotaExceededException The service limit was exceeded.
      • ThrottlingException The request was denied due to request throttling.
      • ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
      • AccessDeniedException You do not have sufficient access to perform this action.
      • 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)

      The CreateCluster API allows you to create both single-region clusters and multi-Region clusters. With the addition of the multiRegionProperties parameter, you can create a cluster with witness Region support and establish peer relationships with clusters in other Regions during creation.

      Creating multi-Region clusters requires additional IAM permissions beyond those needed for single-Region clusters, as detailed in the Required permissions section below.

      Required permissions

      dsql:CreateCluster

      Required to create a cluster.

      Resources: arn:aws:dsql:region:account-id:cluster/*

      dsql:TagResource

      Permission to add tags to a resource.

      Resources: arn:aws:dsql:region:account-id:cluster/*

      dsql:PutMultiRegionProperties

      Permission to configure multi-region properties for a cluster.

      Resources: arn:aws:dsql:region:account-id:cluster/*

      dsql:AddPeerCluster

      When specifying multiRegionProperties.clusters, permission to add peer clusters.

      Resources:

      • Local cluster: arn:aws:dsql:region:account-id:cluster/*

      • Each peer cluster: exact ARN of each specified peer cluster

      dsql:PutWitnessRegion

      When specifying multiRegionProperties.witnessRegion, permission to set a witness Region. This permission is checked both in the cluster Region and in the witness Region.

      Resources: arn:aws:dsql:region:account-id:cluster/*

      Condition Keys: dsql:WitnessRegion (matching the specified witness region)

      • The witness Region specified in multiRegionProperties.witnessRegion cannot be the same as the cluster's Region.


      This is a convenience which creates an instance of the CreateClusterRequest.Builder avoiding the need to create one manually via CreateClusterRequest.builder()

      Parameters:
      createClusterRequest - A Consumer that will call methods on CreateClusterRequest.Builder to 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ServiceQuotaExceededException The service limit was exceeded.
      • ThrottlingException The request was denied due to request throttling.
      • ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
      • AccessDeniedException You do not have sufficient access to perform this action.
      • 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 invoke Throwable.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.Builder avoiding the need to create one manually via DeleteClusterRequest.builder()

      Parameters:
      deleteClusterRequest - A Consumer that will call methods on DeleteClusterRequest.Builder to 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 invoke Throwable.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

      default CompletableFuture<GetClusterResponse> getCluster(GetClusterRequest getClusterRequest)

      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 invoke Throwable.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.Builder avoiding the need to create one manually via GetClusterRequest.builder()

      Parameters:
      getClusterRequest - A Consumer that will call methods on GetClusterRequest.Builder to 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 invoke Throwable.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:
    • getVpcEndpointServiceName

      default CompletableFuture<GetVpcEndpointServiceNameResponse> getVpcEndpointServiceName(GetVpcEndpointServiceNameRequest getVpcEndpointServiceNameRequest)

      Retrieves the VPC endpoint service name.

      Parameters:
      getVpcEndpointServiceNameRequest -
      Returns:
      A Java Future containing the result of the GetVpcEndpointServiceName 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ThrottlingException The request was denied due to request throttling.
      • ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
      • AccessDeniedException You do not have sufficient access to perform this action.
      • 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:
    • getVpcEndpointServiceName

      default CompletableFuture<GetVpcEndpointServiceNameResponse> getVpcEndpointServiceName(Consumer<GetVpcEndpointServiceNameRequest.Builder> getVpcEndpointServiceNameRequest)

      Retrieves the VPC endpoint service name.


      This is a convenience which creates an instance of the GetVpcEndpointServiceNameRequest.Builder avoiding the need to create one manually via GetVpcEndpointServiceNameRequest.builder()

      Parameters:
      getVpcEndpointServiceNameRequest - A Consumer that will call methods on GetVpcEndpointServiceNameRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetVpcEndpointServiceName 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ThrottlingException The request was denied due to request throttling.
      • ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
      • AccessDeniedException You do not have sufficient access to perform this action.
      • 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 invoke Throwable.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.Builder avoiding the need to create one manually via ListClustersRequest.builder()

      Parameters:
      listClustersRequest - A Consumer that will call methods on ListClustersRequest.Builder to 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 invoke Throwable.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(ListClustersRequest 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 new Subscription i.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
       
       software.amazon.awssdk.services.dsql.paginators.ListClustersPublisher publisher = client.listClustersPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       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) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      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 invoke Throwable.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 new Subscription i.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
       
       software.amazon.awssdk.services.dsql.paginators.ListClustersPublisher publisher = client.listClustersPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       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) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      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.Builder avoiding the need to create one manually via ListClustersRequest.builder()

      Parameters:
      listClustersRequest - A Consumer that will call methods on ListClustersRequest.Builder to 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 invoke Throwable.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 invoke Throwable.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.Builder avoiding the need to create one manually via ListTagsForResourceRequest.builder()

      Parameters:
      listTagsForResourceRequest - A Consumer that will call methods on ListTagsForResourceRequest.Builder to 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 invoke Throwable.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

      default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest)

      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 invoke Throwable.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.Builder avoiding the need to create one manually via TagResourceRequest.builder()

      Parameters:
      tagResourceRequest - A Consumer that will call methods on TagResourceRequest.Builder to 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 invoke Throwable.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 invoke Throwable.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.Builder avoiding the need to create one manually via UntagResourceRequest.builder()

      Parameters:
      untagResourceRequest - A Consumer that will call methods on UntagResourceRequest.Builder to 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 invoke Throwable.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)

      The UpdateCluster API allows you to modify both single-Region and multi-Region cluster configurations. With the multiRegionProperties parameter, you can add or modify witness Region support and manage peer relationships with clusters in other Regions.

      Note that updating multi-region clusters requires additional IAM permissions beyond those needed for standard cluster updates, as detailed in the Permissions section.

      Required permissions

      dsql:UpdateCluster

      Permission to update a DSQL cluster.

      Resources: arn:aws:dsql:region:account-id:cluster/cluster-id

      dsql:PutMultiRegionProperties

      Permission to configure multi-Region properties for a cluster.

      Resources: arn:aws:dsql:region:account-id:cluster/cluster-id

      dsql:GetCluster

      Permission to retrieve cluster information.

      Resources: arn:aws:dsql:region:account-id:cluster/cluster-id

      dsql:AddPeerCluster

      Permission to add peer clusters.

      Resources:

      • Local cluster: arn:aws:dsql:region:account-id:cluster/cluster-id

      • Each peer cluster: exact ARN of each specified peer cluster

      dsql:RemovePeerCluster

      Permission to remove peer clusters. The dsql:RemovePeerCluster permission uses a wildcard ARN pattern to simplify permission management during updates.

      Resources: arn:aws:dsql:*:account-id:cluster/*

      dsql:PutWitnessRegion

      Permission to set a witness Region.

      Resources: arn:aws:dsql:region:account-id:cluster/cluster-id

      Condition Keys: dsql:WitnessRegion (matching the specified witness Region)

      This permission is checked both in the cluster Region and in the witness Region.

      • The witness region specified in multiRegionProperties.witnessRegion cannot be the same as the cluster's Region.

      • When updating clusters with peer relationships, permissions are checked for both adding and removing peers.

      • The dsql:RemovePeerCluster permission uses a wildcard ARN pattern to simplify permission management during updates.

      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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ThrottlingException The request was denied due to request throttling.
      • ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
      • AccessDeniedException You do not have sufficient access to perform this action.
      • 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)

      The UpdateCluster API allows you to modify both single-Region and multi-Region cluster configurations. With the multiRegionProperties parameter, you can add or modify witness Region support and manage peer relationships with clusters in other Regions.

      Note that updating multi-region clusters requires additional IAM permissions beyond those needed for standard cluster updates, as detailed in the Permissions section.

      Required permissions

      dsql:UpdateCluster

      Permission to update a DSQL cluster.

      Resources: arn:aws:dsql:region:account-id:cluster/cluster-id

      dsql:PutMultiRegionProperties

      Permission to configure multi-Region properties for a cluster.

      Resources: arn:aws:dsql:region:account-id:cluster/cluster-id

      dsql:GetCluster

      Permission to retrieve cluster information.

      Resources: arn:aws:dsql:region:account-id:cluster/cluster-id

      dsql:AddPeerCluster

      Permission to add peer clusters.

      Resources:

      • Local cluster: arn:aws:dsql:region:account-id:cluster/cluster-id

      • Each peer cluster: exact ARN of each specified peer cluster

      dsql:RemovePeerCluster

      Permission to remove peer clusters. The dsql:RemovePeerCluster permission uses a wildcard ARN pattern to simplify permission management during updates.

      Resources: arn:aws:dsql:*:account-id:cluster/*

      dsql:PutWitnessRegion

      Permission to set a witness Region.

      Resources: arn:aws:dsql:region:account-id:cluster/cluster-id

      Condition Keys: dsql:WitnessRegion (matching the specified witness Region)

      This permission is checked both in the cluster Region and in the witness Region.

      • The witness region specified in multiRegionProperties.witnessRegion cannot be the same as the cluster's Region.

      • When updating clusters with peer relationships, permissions are checked for both adding and removing peers.

      • The dsql:RemovePeerCluster permission uses a wildcard ARN pattern to simplify permission management during updates.


      This is a convenience which creates an instance of the UpdateClusterRequest.Builder avoiding the need to create one manually via UpdateClusterRequest.builder()

      Parameters:
      updateClusterRequest - A Consumer that will call methods on UpdateClusterRequest.Builder to 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 invoke Throwable.getCause() to retrieve the underlying exception.
      • ThrottlingException The request was denied due to request throttling.
      • ValidationException The input failed to satisfy the constraints specified by an Amazon Web Services service.
      • AccessDeniedException You do not have sufficient access to perform this action.
      • 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

      default DsqlAsyncWaiter waiter()
      Create an instance of DsqlAsyncWaiter using 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

      default DsqlServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      static DsqlAsyncClient create()
      Create a DsqlAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      static DsqlAsyncClientBuilder builder()
      Create a builder that can be used to configure and create a DsqlAsyncClient.