All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.redshiftdata.RedshiftDataAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Redshift Data module holds the client classes that are used for communicating with Redshift Data.

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.redshiftdata;

import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.core.SdkClient;
import software.amazon.awssdk.services.redshiftdata.model.BatchExecuteStatementRequest;
import software.amazon.awssdk.services.redshiftdata.model.BatchExecuteStatementResponse;
import software.amazon.awssdk.services.redshiftdata.model.CancelStatementRequest;
import software.amazon.awssdk.services.redshiftdata.model.CancelStatementResponse;
import software.amazon.awssdk.services.redshiftdata.model.DescribeStatementRequest;
import software.amazon.awssdk.services.redshiftdata.model.DescribeStatementResponse;
import software.amazon.awssdk.services.redshiftdata.model.DescribeTableRequest;
import software.amazon.awssdk.services.redshiftdata.model.DescribeTableResponse;
import software.amazon.awssdk.services.redshiftdata.model.ExecuteStatementRequest;
import software.amazon.awssdk.services.redshiftdata.model.ExecuteStatementResponse;
import software.amazon.awssdk.services.redshiftdata.model.GetStatementResultRequest;
import software.amazon.awssdk.services.redshiftdata.model.GetStatementResultResponse;
import software.amazon.awssdk.services.redshiftdata.model.ListDatabasesRequest;
import software.amazon.awssdk.services.redshiftdata.model.ListDatabasesResponse;
import software.amazon.awssdk.services.redshiftdata.model.ListSchemasRequest;
import software.amazon.awssdk.services.redshiftdata.model.ListSchemasResponse;
import software.amazon.awssdk.services.redshiftdata.model.ListStatementsRequest;
import software.amazon.awssdk.services.redshiftdata.model.ListStatementsResponse;
import software.amazon.awssdk.services.redshiftdata.model.ListTablesRequest;
import software.amazon.awssdk.services.redshiftdata.model.ListTablesResponse;
import software.amazon.awssdk.services.redshiftdata.paginators.DescribeTablePublisher;
import software.amazon.awssdk.services.redshiftdata.paginators.GetStatementResultPublisher;
import software.amazon.awssdk.services.redshiftdata.paginators.ListDatabasesPublisher;
import software.amazon.awssdk.services.redshiftdata.paginators.ListSchemasPublisher;
import software.amazon.awssdk.services.redshiftdata.paginators.ListStatementsPublisher;
import software.amazon.awssdk.services.redshiftdata.paginators.ListTablesPublisher;

/**
 * Service client for accessing Redshift Data API Service asynchronously. This can be created using the static
 * {@link #builder()} method.
 *
 * 

* You can use the Amazon Redshift Data API to run queries on Amazon Redshift tables. You can run SQL statements, which * are committed if the statement succeeds. *

*

* For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the * Amazon Redshift Cluster Management Guide. *

*/ @Generated("software.amazon.awssdk:codegen") @SdkPublicApi @ThreadSafe public interface RedshiftDataAsyncClient extends SdkClient { String SERVICE_NAME = "redshift-data"; /** * Value for looking up the service's metadata from the * {@link software.amazon.awssdk.regions.ServiceMetadataProvider}. */ String SERVICE_METADATA_ID = "redshift-data"; /** * Create a {@link RedshiftDataAsyncClient} with the region loaded from the * {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the * {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}. */ static RedshiftDataAsyncClient create() { return builder().build(); } /** * Create a builder that can be used to configure and create a {@link RedshiftDataAsyncClient}. */ static RedshiftDataAsyncClientBuilder builder() { return new DefaultRedshiftDataAsyncClientBuilder(); } /** *

* Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL). * Depending on the authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
* * @param batchExecuteStatementRequest * @return A Java Future containing the result of the BatchExecuteStatement operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • ActiveStatementsExceededException The number of active statements exceeds the limit.
  • *
  • BatchExecuteStatementException An SQL statement encountered an environmental error while running.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.BatchExecuteStatement * @see AWS API Documentation */ default CompletableFuture batchExecuteStatement( BatchExecuteStatementRequest batchExecuteStatementRequest) { throw new UnsupportedOperationException(); } /** *

* Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL). * Depending on the authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a convenience which creates an instance of the {@link BatchExecuteStatementRequest.Builder} avoiding the * need to create one manually via {@link BatchExecuteStatementRequest#builder()} *

* * @param batchExecuteStatementRequest * A {@link Consumer} that will call methods on {@link BatchExecuteStatementInput.Builder} to create a * request. * @return A Java Future containing the result of the BatchExecuteStatement operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • ActiveStatementsExceededException The number of active statements exceeds the limit.
  • *
  • BatchExecuteStatementException An SQL statement encountered an environmental error while running.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.BatchExecuteStatement * @see AWS API Documentation */ default CompletableFuture batchExecuteStatement( Consumer batchExecuteStatementRequest) { return batchExecuteStatement(BatchExecuteStatementRequest.builder().applyMutation(batchExecuteStatementRequest).build()); } /** *

* Cancels a running query. To be canceled, a query must be running. *

* * @param cancelStatementRequest * @return A Java Future containing the result of the CancelStatement operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • ResourceNotFoundException The Amazon Redshift Data API operation failed due to a missing resource.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.CancelStatement * @see AWS * API Documentation */ default CompletableFuture cancelStatement(CancelStatementRequest cancelStatementRequest) { throw new UnsupportedOperationException(); } /** *

* Cancels a running query. To be canceled, a query must be running. *

*
*

* This is a convenience which creates an instance of the {@link CancelStatementRequest.Builder} avoiding the need * to create one manually via {@link CancelStatementRequest#builder()} *

* * @param cancelStatementRequest * A {@link Consumer} that will call methods on {@link CancelStatementRequest.Builder} to create a request. * @return A Java Future containing the result of the CancelStatement operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • ResourceNotFoundException The Amazon Redshift Data API operation failed due to a missing resource.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.CancelStatement * @see AWS * API Documentation */ default CompletableFuture cancelStatement( Consumer cancelStatementRequest) { return cancelStatement(CancelStatementRequest.builder().applyMutation(cancelStatementRequest).build()); } /** *

* Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The * information includes when the query started, when it finished, the query status, the number of rows returned, and * the SQL statement. *

* * @param describeStatementRequest * @return A Java Future containing the result of the DescribeStatement operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • ResourceNotFoundException The Amazon Redshift Data API operation failed due to a missing resource.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.DescribeStatement * @see AWS API Documentation */ default CompletableFuture describeStatement(DescribeStatementRequest describeStatementRequest) { throw new UnsupportedOperationException(); } /** *

* Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The * information includes when the query started, when it finished, the query status, the number of rows returned, and * the SQL statement. *

*
*

* This is a convenience which creates an instance of the {@link DescribeStatementRequest.Builder} avoiding the need * to create one manually via {@link DescribeStatementRequest#builder()} *

* * @param describeStatementRequest * A {@link Consumer} that will call methods on {@link DescribeStatementRequest.Builder} to create a request. * @return A Java Future containing the result of the DescribeStatement operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • ResourceNotFoundException The Amazon Redshift Data API operation failed due to a missing resource.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.DescribeStatement * @see AWS API Documentation */ default CompletableFuture describeStatement( Consumer describeStatementRequest) { return describeStatement(DescribeStatementRequest.builder().applyMutation(describeStatementRequest).build()); } /** *

* Describes the detailed information about a table from metadata in the cluster. The information includes its * columns. A token is returned to page through the column list. Depending on the authorization method, use one of * the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
* * @param describeTableRequest * @return A Java Future containing the result of the DescribeTable operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.DescribeTable * @see AWS * API Documentation */ default CompletableFuture describeTable(DescribeTableRequest describeTableRequest) { throw new UnsupportedOperationException(); } /** *

* Describes the detailed information about a table from metadata in the cluster. The information includes its * columns. A token is returned to page through the column list. Depending on the authorization method, use one of * the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a convenience which creates an instance of the {@link DescribeTableRequest.Builder} avoiding the need to * create one manually via {@link DescribeTableRequest#builder()} *

* * @param describeTableRequest * A {@link Consumer} that will call methods on {@link DescribeTableRequest.Builder} to create a request. * @return A Java Future containing the result of the DescribeTable operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.DescribeTable * @see AWS * API Documentation */ default CompletableFuture describeTable(Consumer describeTableRequest) { return describeTable(DescribeTableRequest.builder().applyMutation(describeTableRequest).build()); } /** *

* Describes the detailed information about a table from metadata in the cluster. The information includes its * columns. A token is returned to page through the column list. Depending on the authorization method, use one of * the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a variant of * {@link #describeTable(software.amazon.awssdk.services.redshiftdata.model.DescribeTableRequest)} 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.DescribeTablePublisher publisher = client.describeTablePaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.DescribeTablePublisher publisher = client.describeTablePaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.redshiftdata.model.DescribeTableResponse 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 * {@link #describeTable(software.amazon.awssdk.services.redshiftdata.model.DescribeTableRequest)} operation. *

* * @param describeTableRequest * @return 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. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.DescribeTable * @see AWS * API Documentation */ default DescribeTablePublisher describeTablePaginator(DescribeTableRequest describeTableRequest) { throw new UnsupportedOperationException(); } /** *

* Describes the detailed information about a table from metadata in the cluster. The information includes its * columns. A token is returned to page through the column list. Depending on the authorization method, use one of * the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a variant of * {@link #describeTable(software.amazon.awssdk.services.redshiftdata.model.DescribeTableRequest)} 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.DescribeTablePublisher publisher = client.describeTablePaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.DescribeTablePublisher publisher = client.describeTablePaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.redshiftdata.model.DescribeTableResponse 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 * {@link #describeTable(software.amazon.awssdk.services.redshiftdata.model.DescribeTableRequest)} operation. *

*

* This is a convenience which creates an instance of the {@link DescribeTableRequest.Builder} avoiding the need to * create one manually via {@link DescribeTableRequest#builder()} *

* * @param describeTableRequest * A {@link Consumer} that will call methods on {@link DescribeTableRequest.Builder} to create a request. * @return 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. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.DescribeTable * @see AWS * API Documentation */ default DescribeTablePublisher describeTablePaginator(Consumer describeTableRequest) { return describeTablePaginator(DescribeTableRequest.builder().applyMutation(describeTableRequest).build()); } /** *

* Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL). This * statement must be a single SQL statement. Depending on the authorization method, use one of the following * combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
* * @param executeStatementRequest * @return A Java Future containing the result of the ExecuteStatement operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • ExecuteStatementException The SQL statement encountered an environmental error while running.
  • *
  • ActiveStatementsExceededException The number of active statements exceeds the limit.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ExecuteStatement * @see AWS API Documentation */ default CompletableFuture executeStatement(ExecuteStatementRequest executeStatementRequest) { throw new UnsupportedOperationException(); } /** *

* Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL). This * statement must be a single SQL statement. Depending on the authorization method, use one of the following * combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a convenience which creates an instance of the {@link ExecuteStatementRequest.Builder} avoiding the need * to create one manually via {@link ExecuteStatementRequest#builder()} *

* * @param executeStatementRequest * A {@link Consumer} that will call methods on {@link ExecuteStatementInput.Builder} to create a request. * @return A Java Future containing the result of the ExecuteStatement operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • ExecuteStatementException The SQL statement encountered an environmental error while running.
  • *
  • ActiveStatementsExceededException The number of active statements exceeds the limit.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ExecuteStatement * @see AWS API Documentation */ default CompletableFuture executeStatement( Consumer executeStatementRequest) { return executeStatement(ExecuteStatementRequest.builder().applyMutation(executeStatementRequest).build()); } /** *

* Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement * results. *

* * @param getStatementResultRequest * @return A Java Future containing the result of the GetStatementResult operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • ResourceNotFoundException The Amazon Redshift Data API operation failed due to a missing resource.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.GetStatementResult * @see AWS API Documentation */ default CompletableFuture getStatementResult(GetStatementResultRequest getStatementResultRequest) { throw new UnsupportedOperationException(); } /** *

* Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement * results. *

*
*

* This is a convenience which creates an instance of the {@link GetStatementResultRequest.Builder} avoiding the * need to create one manually via {@link GetStatementResultRequest#builder()} *

* * @param getStatementResultRequest * A {@link Consumer} that will call methods on {@link GetStatementResultRequest.Builder} to create a * request. * @return A Java Future containing the result of the GetStatementResult operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • ResourceNotFoundException The Amazon Redshift Data API operation failed due to a missing resource.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.GetStatementResult * @see AWS API Documentation */ default CompletableFuture getStatementResult( Consumer getStatementResultRequest) { return getStatementResult(GetStatementResultRequest.builder().applyMutation(getStatementResultRequest).build()); } /** *

* Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement * results. *

*
*

* This is a variant of * {@link #getStatementResult(software.amazon.awssdk.services.redshiftdata.model.GetStatementResultRequest)} * 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.GetStatementResultPublisher publisher = client.getStatementResultPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.GetStatementResultPublisher publisher = client.getStatementResultPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.redshiftdata.model.GetStatementResultResponse 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 null 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 * {@link #getStatementResult(software.amazon.awssdk.services.redshiftdata.model.GetStatementResultRequest)} * operation. *

* * @param getStatementResultRequest * @return 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. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • ResourceNotFoundException The Amazon Redshift Data API operation failed due to a missing resource.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.GetStatementResult * @see AWS API Documentation */ default GetStatementResultPublisher getStatementResultPaginator(GetStatementResultRequest getStatementResultRequest) { throw new UnsupportedOperationException(); } /** *

* Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement * results. *

*
*

* This is a variant of * {@link #getStatementResult(software.amazon.awssdk.services.redshiftdata.model.GetStatementResultRequest)} * 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.GetStatementResultPublisher publisher = client.getStatementResultPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.GetStatementResultPublisher publisher = client.getStatementResultPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.redshiftdata.model.GetStatementResultResponse 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 null 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 * {@link #getStatementResult(software.amazon.awssdk.services.redshiftdata.model.GetStatementResultRequest)} * operation. *

*

* This is a convenience which creates an instance of the {@link GetStatementResultRequest.Builder} avoiding the * need to create one manually via {@link GetStatementResultRequest#builder()} *

* * @param getStatementResultRequest * A {@link Consumer} that will call methods on {@link GetStatementResultRequest.Builder} to create a * request. * @return 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. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • ResourceNotFoundException The Amazon Redshift Data API operation failed due to a missing resource.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.GetStatementResult * @see AWS API Documentation */ default GetStatementResultPublisher getStatementResultPaginator( Consumer getStatementResultRequest) { return getStatementResultPaginator(GetStatementResultRequest.builder().applyMutation(getStatementResultRequest).build()); } /** *

* List the databases in a cluster. A token is returned to page through the database list. Depending on the * authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
* * @param listDatabasesRequest * @return A Java Future containing the result of the ListDatabases operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListDatabases * @see AWS * API Documentation */ default CompletableFuture listDatabases(ListDatabasesRequest listDatabasesRequest) { throw new UnsupportedOperationException(); } /** *

* List the databases in a cluster. A token is returned to page through the database list. Depending on the * authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a convenience which creates an instance of the {@link ListDatabasesRequest.Builder} avoiding the need to * create one manually via {@link ListDatabasesRequest#builder()} *

* * @param listDatabasesRequest * A {@link Consumer} that will call methods on {@link ListDatabasesRequest.Builder} to create a request. * @return A Java Future containing the result of the ListDatabases operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListDatabases * @see AWS * API Documentation */ default CompletableFuture listDatabases(Consumer listDatabasesRequest) { return listDatabases(ListDatabasesRequest.builder().applyMutation(listDatabasesRequest).build()); } /** *

* List the databases in a cluster. A token is returned to page through the database list. Depending on the * authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a variant of * {@link #listDatabases(software.amazon.awssdk.services.redshiftdata.model.ListDatabasesRequest)} 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListDatabasesPublisher publisher = client.listDatabasesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListDatabasesPublisher publisher = client.listDatabasesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.redshiftdata.model.ListDatabasesResponse 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 * {@link #listDatabases(software.amazon.awssdk.services.redshiftdata.model.ListDatabasesRequest)} operation. *

* * @param listDatabasesRequest * @return 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. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListDatabases * @see AWS * API Documentation */ default ListDatabasesPublisher listDatabasesPaginator(ListDatabasesRequest listDatabasesRequest) { throw new UnsupportedOperationException(); } /** *

* List the databases in a cluster. A token is returned to page through the database list. Depending on the * authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a variant of * {@link #listDatabases(software.amazon.awssdk.services.redshiftdata.model.ListDatabasesRequest)} 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListDatabasesPublisher publisher = client.listDatabasesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListDatabasesPublisher publisher = client.listDatabasesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.redshiftdata.model.ListDatabasesResponse 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 * {@link #listDatabases(software.amazon.awssdk.services.redshiftdata.model.ListDatabasesRequest)} operation. *

*

* This is a convenience which creates an instance of the {@link ListDatabasesRequest.Builder} avoiding the need to * create one manually via {@link ListDatabasesRequest#builder()} *

* * @param listDatabasesRequest * A {@link Consumer} that will call methods on {@link ListDatabasesRequest.Builder} to create a request. * @return 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. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListDatabases * @see AWS * API Documentation */ default ListDatabasesPublisher listDatabasesPaginator(Consumer listDatabasesRequest) { return listDatabasesPaginator(ListDatabasesRequest.builder().applyMutation(listDatabasesRequest).build()); } /** *

* Lists the schemas in a database. A token is returned to page through the schema list. Depending on the * authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
* * @param listSchemasRequest * @return A Java Future containing the result of the ListSchemas operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListSchemas * @see AWS API * Documentation */ default CompletableFuture listSchemas(ListSchemasRequest listSchemasRequest) { throw new UnsupportedOperationException(); } /** *

* Lists the schemas in a database. A token is returned to page through the schema list. Depending on the * authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a convenience which creates an instance of the {@link ListSchemasRequest.Builder} avoiding the need to * create one manually via {@link ListSchemasRequest#builder()} *

* * @param listSchemasRequest * A {@link Consumer} that will call methods on {@link ListSchemasRequest.Builder} to create a request. * @return A Java Future containing the result of the ListSchemas operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListSchemas * @see AWS API * Documentation */ default CompletableFuture listSchemas(Consumer listSchemasRequest) { return listSchemas(ListSchemasRequest.builder().applyMutation(listSchemasRequest).build()); } /** *

* Lists the schemas in a database. A token is returned to page through the schema list. Depending on the * authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a variant of {@link #listSchemas(software.amazon.awssdk.services.redshiftdata.model.ListSchemasRequest)} * 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListSchemasPublisher publisher = client.listSchemasPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListSchemasPublisher publisher = client.listSchemasPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.redshiftdata.model.ListSchemasResponse 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 * {@link #listSchemas(software.amazon.awssdk.services.redshiftdata.model.ListSchemasRequest)} operation. *

* * @param listSchemasRequest * @return 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. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListSchemas * @see AWS API * Documentation */ default ListSchemasPublisher listSchemasPaginator(ListSchemasRequest listSchemasRequest) { throw new UnsupportedOperationException(); } /** *

* Lists the schemas in a database. A token is returned to page through the schema list. Depending on the * authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a variant of {@link #listSchemas(software.amazon.awssdk.services.redshiftdata.model.ListSchemasRequest)} * 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListSchemasPublisher publisher = client.listSchemasPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListSchemasPublisher publisher = client.listSchemasPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.redshiftdata.model.ListSchemasResponse 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 * {@link #listSchemas(software.amazon.awssdk.services.redshiftdata.model.ListSchemasRequest)} operation. *

*

* This is a convenience which creates an instance of the {@link ListSchemasRequest.Builder} avoiding the need to * create one manually via {@link ListSchemasRequest#builder()} *

* * @param listSchemasRequest * A {@link Consumer} that will call methods on {@link ListSchemasRequest.Builder} to create a request. * @return 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. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListSchemas * @see AWS API * Documentation */ default ListSchemasPublisher listSchemasPaginator(Consumer listSchemasRequest) { return listSchemasPaginator(ListSchemasRequest.builder().applyMutation(listSchemasRequest).build()); } /** *

* List of SQL statements. By default, only finished statements are shown. A token is returned to page through the * statement list. *

* * @param listStatementsRequest * @return A Java Future containing the result of the ListStatements operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListStatements * @see AWS * API Documentation */ default CompletableFuture listStatements(ListStatementsRequest listStatementsRequest) { throw new UnsupportedOperationException(); } /** *

* List of SQL statements. By default, only finished statements are shown. A token is returned to page through the * statement list. *

*
*

* This is a convenience which creates an instance of the {@link ListStatementsRequest.Builder} avoiding the need to * create one manually via {@link ListStatementsRequest#builder()} *

* * @param listStatementsRequest * A {@link Consumer} that will call methods on {@link ListStatementsRequest.Builder} to create a request. * @return A Java Future containing the result of the ListStatements operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListStatements * @see AWS * API Documentation */ default CompletableFuture listStatements(Consumer listStatementsRequest) { return listStatements(ListStatementsRequest.builder().applyMutation(listStatementsRequest).build()); } /** *

* List of SQL statements. By default, only finished statements are shown. A token is returned to page through the * statement list. *

*
*

* This is a variant of * {@link #listStatements(software.amazon.awssdk.services.redshiftdata.model.ListStatementsRequest)} 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListStatementsPublisher publisher = client.listStatementsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListStatementsPublisher publisher = client.listStatementsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.redshiftdata.model.ListStatementsResponse 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 * {@link #listStatements(software.amazon.awssdk.services.redshiftdata.model.ListStatementsRequest)} operation. *

* * @param listStatementsRequest * @return 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. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListStatements * @see AWS * API Documentation */ default ListStatementsPublisher listStatementsPaginator(ListStatementsRequest listStatementsRequest) { throw new UnsupportedOperationException(); } /** *

* List of SQL statements. By default, only finished statements are shown. A token is returned to page through the * statement list. *

*
*

* This is a variant of * {@link #listStatements(software.amazon.awssdk.services.redshiftdata.model.ListStatementsRequest)} 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListStatementsPublisher publisher = client.listStatementsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListStatementsPublisher publisher = client.listStatementsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.redshiftdata.model.ListStatementsResponse 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 * {@link #listStatements(software.amazon.awssdk.services.redshiftdata.model.ListStatementsRequest)} operation. *

*

* This is a convenience which creates an instance of the {@link ListStatementsRequest.Builder} avoiding the need to * create one manually via {@link ListStatementsRequest#builder()} *

* * @param listStatementsRequest * A {@link Consumer} that will call methods on {@link ListStatementsRequest.Builder} to create a request. * @return 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. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListStatements * @see AWS * API Documentation */ default ListStatementsPublisher listStatementsPaginator(Consumer listStatementsRequest) { return listStatementsPaginator(ListStatementsRequest.builder().applyMutation(listStatementsRequest).build()); } /** *

* List the tables in a database. If neither SchemaPattern nor TablePattern are specified, * then all tables in the database are returned. A token is returned to page through the table list. Depending on * the authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
* * @param listTablesRequest * @return A Java Future containing the result of the ListTables operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListTables * @see AWS API * Documentation */ default CompletableFuture listTables(ListTablesRequest listTablesRequest) { throw new UnsupportedOperationException(); } /** *

* List the tables in a database. If neither SchemaPattern nor TablePattern are specified, * then all tables in the database are returned. A token is returned to page through the table list. Depending on * the authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a convenience which creates an instance of the {@link ListTablesRequest.Builder} avoiding the need to * create one manually via {@link ListTablesRequest#builder()} *

* * @param listTablesRequest * A {@link Consumer} that will call methods on {@link ListTablesRequest.Builder} to create a request. * @return A Java Future containing the result of the ListTables operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListTables * @see AWS API * Documentation */ default CompletableFuture listTables(Consumer listTablesRequest) { return listTables(ListTablesRequest.builder().applyMutation(listTablesRequest).build()); } /** *

* List the tables in a database. If neither SchemaPattern nor TablePattern are specified, * then all tables in the database are returned. A token is returned to page through the table list. Depending on * the authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a variant of {@link #listTables(software.amazon.awssdk.services.redshiftdata.model.ListTablesRequest)} * 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListTablesPublisher publisher = client.listTablesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListTablesPublisher publisher = client.listTablesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.redshiftdata.model.ListTablesResponse 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 * {@link #listTables(software.amazon.awssdk.services.redshiftdata.model.ListTablesRequest)} operation. *

* * @param listTablesRequest * @return 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. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListTables * @see AWS API * Documentation */ default ListTablesPublisher listTablesPaginator(ListTablesRequest listTablesRequest) { throw new UnsupportedOperationException(); } /** *

* List the tables in a database. If neither SchemaPattern nor TablePattern are specified, * then all tables in the database are returned. A token is returned to page through the table list. Depending on * the authorization method, use one of the following combinations of request parameters: *

*
    *
  • *

    * Secrets Manager - when connecting to a cluster, specify the Amazon Resource Name (ARN) of the secret, the * database name, and the cluster identifier that matches the cluster in the secret. When connecting to a serverless * workgroup, specify the Amazon Resource Name (ARN) of the secret and the database name. *

    *
  • *
  • *

    * Temporary credentials - when connecting to a cluster, specify the cluster identifier, the database name, and the * database user name. Also, permission to call the redshift:GetClusterCredentials operation is * required. When connecting to a serverless workgroup, specify the workgroup name and database name. Also, * permission to call the redshift-serverless:GetCredentials operation is required. *

    *
  • *
*
*

* This is a variant of {@link #listTables(software.amazon.awssdk.services.redshiftdata.model.ListTablesRequest)} * 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListTablesPublisher publisher = client.listTablesPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.redshiftdata.paginators.ListTablesPublisher publisher = client.listTablesPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.redshiftdata.model.ListTablesResponse 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 * {@link #listTables(software.amazon.awssdk.services.redshiftdata.model.ListTablesRequest)} operation. *

*

* This is a convenience which creates an instance of the {@link ListTablesRequest.Builder} avoiding the need to * create one manually via {@link ListTablesRequest#builder()} *

* * @param listTablesRequest * A {@link Consumer} that will call methods on {@link ListTablesRequest.Builder} to create a request. * @return 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. *
    *
  • ValidationException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • InternalServerException The Amazon Redshift Data API operation failed due to invalid input.
  • *
  • DatabaseConnectionException Connection to a database failed.
  • *
  • 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.
  • *
  • RedshiftDataException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample RedshiftDataAsyncClient.ListTables * @see AWS API * Documentation */ default ListTablesPublisher listTablesPaginator(Consumer listTablesRequest) { return listTablesPaginator(ListTablesRequest.builder().applyMutation(listTablesRequest).build()); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy