@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface RedshiftDataClient extends SdkClient
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, see Using the Amazon Redshift Data API in the Amazon Redshift Cluster Management Guide.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
default BatchExecuteStatementResponse |
batchExecuteStatement(BatchExecuteStatementRequest batchExecuteStatementRequest)
Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL).
|
default BatchExecuteStatementResponse |
batchExecuteStatement(Consumer<BatchExecuteStatementRequest.Builder> batchExecuteStatementRequest)
Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL).
|
static RedshiftDataClientBuilder |
builder()
Create a builder that can be used to configure and create a
RedshiftDataClient. |
default CancelStatementResponse |
cancelStatement(CancelStatementRequest cancelStatementRequest)
Cancels a running query.
|
default CancelStatementResponse |
cancelStatement(Consumer<CancelStatementRequest.Builder> cancelStatementRequest)
Cancels a running query.
|
static RedshiftDataClient |
create()
Create a
RedshiftDataClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default DescribeStatementResponse |
describeStatement(Consumer<DescribeStatementRequest.Builder> describeStatementRequest)
Describes the details about a specific instance when a query was run by the Amazon Redshift Data API.
|
default DescribeStatementResponse |
describeStatement(DescribeStatementRequest describeStatementRequest)
Describes the details about a specific instance when a query was run by the Amazon Redshift Data API.
|
default DescribeTableResponse |
describeTable(Consumer<DescribeTableRequest.Builder> describeTableRequest)
Describes the detailed information about a table from metadata in the cluster.
|
default DescribeTableResponse |
describeTable(DescribeTableRequest describeTableRequest)
Describes the detailed information about a table from metadata in the cluster.
|
default DescribeTableIterable |
describeTablePaginator(Consumer<DescribeTableRequest.Builder> describeTableRequest)
Describes the detailed information about a table from metadata in the cluster.
|
default DescribeTableIterable |
describeTablePaginator(DescribeTableRequest describeTableRequest)
Describes the detailed information about a table from metadata in the cluster.
|
default ExecuteStatementResponse |
executeStatement(Consumer<ExecuteStatementRequest.Builder> executeStatementRequest)
Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL).
|
default ExecuteStatementResponse |
executeStatement(ExecuteStatementRequest executeStatementRequest)
Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL).
|
default GetStatementResultResponse |
getStatementResult(Consumer<GetStatementResultRequest.Builder> getStatementResultRequest)
Fetches the temporarily cached result of an SQL statement.
|
default GetStatementResultResponse |
getStatementResult(GetStatementResultRequest getStatementResultRequest)
Fetches the temporarily cached result of an SQL statement.
|
default GetStatementResultIterable |
getStatementResultPaginator(Consumer<GetStatementResultRequest.Builder> getStatementResultRequest)
Fetches the temporarily cached result of an SQL statement.
|
default GetStatementResultIterable |
getStatementResultPaginator(GetStatementResultRequest getStatementResultRequest)
Fetches the temporarily cached result of an SQL statement.
|
default ListDatabasesResponse |
listDatabases(Consumer<ListDatabasesRequest.Builder> listDatabasesRequest)
List the databases in a cluster.
|
default ListDatabasesResponse |
listDatabases(ListDatabasesRequest listDatabasesRequest)
List the databases in a cluster.
|
default ListDatabasesIterable |
listDatabasesPaginator(Consumer<ListDatabasesRequest.Builder> listDatabasesRequest)
List the databases in a cluster.
|
default ListDatabasesIterable |
listDatabasesPaginator(ListDatabasesRequest listDatabasesRequest)
List the databases in a cluster.
|
default ListSchemasResponse |
listSchemas(Consumer<ListSchemasRequest.Builder> listSchemasRequest)
Lists the schemas in a database.
|
default ListSchemasResponse |
listSchemas(ListSchemasRequest listSchemasRequest)
Lists the schemas in a database.
|
default ListSchemasIterable |
listSchemasPaginator(Consumer<ListSchemasRequest.Builder> listSchemasRequest)
Lists the schemas in a database.
|
default ListSchemasIterable |
listSchemasPaginator(ListSchemasRequest listSchemasRequest)
Lists the schemas in a database.
|
default ListStatementsResponse |
listStatements(Consumer<ListStatementsRequest.Builder> listStatementsRequest)
List of SQL statements.
|
default ListStatementsResponse |
listStatements(ListStatementsRequest listStatementsRequest)
List of SQL statements.
|
default ListStatementsIterable |
listStatementsPaginator(Consumer<ListStatementsRequest.Builder> listStatementsRequest)
List of SQL statements.
|
default ListStatementsIterable |
listStatementsPaginator(ListStatementsRequest listStatementsRequest)
List of SQL statements.
|
default ListTablesResponse |
listTables(Consumer<ListTablesRequest.Builder> listTablesRequest)
List the tables in a database.
|
default ListTablesResponse |
listTables(ListTablesRequest listTablesRequest)
List the tables in a database.
|
default ListTablesIterable |
listTablesPaginator(Consumer<ListTablesRequest.Builder> listTablesRequest)
List the tables in a database.
|
default ListTablesIterable |
listTablesPaginator(ListTablesRequest listTablesRequest)
List the tables in a database.
|
static ServiceMetadata |
serviceMetadata() |
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.static RedshiftDataClient create()
RedshiftDataClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static RedshiftDataClientBuilder builder()
RedshiftDataClient.default BatchExecuteStatementResponse batchExecuteStatement(BatchExecuteStatementRequest batchExecuteStatementRequest) throws ValidationException, ActiveStatementsExceededException, BatchExecuteStatementException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
batchExecuteStatementRequest - 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.AwsServiceExceptiondefault BatchExecuteStatementResponse batchExecuteStatement(Consumer<BatchExecuteStatementRequest.Builder> batchExecuteStatementRequest) throws ValidationException, ActiveStatementsExceededException, BatchExecuteStatementException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a convenience which creates an instance of the BatchExecuteStatementRequest.Builder avoiding the
need to create one manually via BatchExecuteStatementRequest.builder()
batchExecuteStatementRequest - A Consumer that will call methods on BatchExecuteStatementInput.Builder to create a
request.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.AwsServiceExceptiondefault CancelStatementResponse cancelStatement(CancelStatementRequest cancelStatementRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
Cancels a running query. To be canceled, a query must be running.
cancelStatementRequest - 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.AwsServiceExceptiondefault CancelStatementResponse cancelStatement(Consumer<CancelStatementRequest.Builder> cancelStatementRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
Cancels a running query. To be canceled, a query must be running.
This is a convenience which creates an instance of the CancelStatementRequest.Builder avoiding the need
to create one manually via CancelStatementRequest.builder()
cancelStatementRequest - A Consumer that will call methods on CancelStatementRequest.Builder to create a request.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.AwsServiceExceptiondefault DescribeStatementResponse describeStatement(DescribeStatementRequest describeStatementRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, RedshiftDataException
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.
describeStatementRequest - 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.AwsServiceExceptiondefault DescribeStatementResponse describeStatement(Consumer<DescribeStatementRequest.Builder> describeStatementRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, RedshiftDataException
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 DescribeStatementRequest.Builder avoiding the need
to create one manually via DescribeStatementRequest.builder()
describeStatementRequest - A Consumer that will call methods on DescribeStatementRequest.Builder to create a request.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.AwsServiceExceptiondefault DescribeTableResponse describeTable(DescribeTableRequest describeTableRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
describeTableRequest - 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.AwsServiceExceptiondefault DescribeTableResponse describeTable(Consumer<DescribeTableRequest.Builder> describeTableRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a convenience which creates an instance of the DescribeTableRequest.Builder avoiding the need to
create one manually via DescribeTableRequest.builder()
describeTableRequest - A Consumer that will call methods on DescribeTableRequest.Builder to create a request.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.AwsServiceExceptiondefault DescribeTableIterable describeTablePaginator(DescribeTableRequest describeTableRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a variant of
describeTable(software.amazon.awssdk.services.redshiftdata.model.DescribeTableRequest) operation. The
return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.redshiftdata.paginators.DescribeTableIterable responses = client.describeTablePaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.redshiftdata.paginators.DescribeTableIterable responses = client
.describeTablePaginator(request);
for (software.amazon.awssdk.services.redshiftdata.model.DescribeTableResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.redshiftdata.paginators.DescribeTableIterable responses = client.describeTablePaginator(request);
responses.iterator().forEachRemaining(....);
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
describeTable(software.amazon.awssdk.services.redshiftdata.model.DescribeTableRequest) operation.
describeTableRequest - 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.AwsServiceExceptiondefault DescribeTableIterable describeTablePaginator(Consumer<DescribeTableRequest.Builder> describeTableRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a variant of
describeTable(software.amazon.awssdk.services.redshiftdata.model.DescribeTableRequest) operation. The
return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.redshiftdata.paginators.DescribeTableIterable responses = client.describeTablePaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.redshiftdata.paginators.DescribeTableIterable responses = client
.describeTablePaginator(request);
for (software.amazon.awssdk.services.redshiftdata.model.DescribeTableResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.redshiftdata.paginators.DescribeTableIterable responses = client.describeTablePaginator(request);
responses.iterator().forEachRemaining(....);
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
describeTable(software.amazon.awssdk.services.redshiftdata.model.DescribeTableRequest) operation.
This is a convenience which creates an instance of the DescribeTableRequest.Builder avoiding the need to
create one manually via DescribeTableRequest.builder()
describeTableRequest - A Consumer that will call methods on DescribeTableRequest.Builder to create a request.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.AwsServiceExceptiondefault ExecuteStatementResponse executeStatement(ExecuteStatementRequest executeStatementRequest) throws ValidationException, ExecuteStatementException, ActiveStatementsExceededException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
executeStatementRequest - 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.AwsServiceExceptiondefault ExecuteStatementResponse executeStatement(Consumer<ExecuteStatementRequest.Builder> executeStatementRequest) throws ValidationException, ExecuteStatementException, ActiveStatementsExceededException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a convenience which creates an instance of the ExecuteStatementRequest.Builder avoiding the need
to create one manually via ExecuteStatementRequest.builder()
executeStatementRequest - A Consumer that will call methods on ExecuteStatementInput.Builder to create a request.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.AwsServiceExceptiondefault GetStatementResultResponse getStatementResult(GetStatementResultRequest getStatementResultRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, RedshiftDataException
Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement results.
getStatementResultRequest - 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.AwsServiceExceptiondefault GetStatementResultResponse getStatementResult(Consumer<GetStatementResultRequest.Builder> getStatementResultRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, RedshiftDataException
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 GetStatementResultRequest.Builder avoiding the
need to create one manually via GetStatementResultRequest.builder()
getStatementResultRequest - A Consumer that will call methods on GetStatementResultRequest.Builder to create a
request.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.AwsServiceExceptiondefault GetStatementResultIterable getStatementResultPaginator(GetStatementResultRequest getStatementResultRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, RedshiftDataException
Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement results.
This is a variant of
getStatementResult(software.amazon.awssdk.services.redshiftdata.model.GetStatementResultRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.redshiftdata.paginators.GetStatementResultIterable responses = client.getStatementResultPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.redshiftdata.paginators.GetStatementResultIterable responses = client
.getStatementResultPaginator(request);
for (software.amazon.awssdk.services.redshiftdata.model.GetStatementResultResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.redshiftdata.paginators.GetStatementResultIterable responses = client.getStatementResultPaginator(request);
responses.iterator().forEachRemaining(....);
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
getStatementResult(software.amazon.awssdk.services.redshiftdata.model.GetStatementResultRequest)
operation.
getStatementResultRequest - 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.AwsServiceExceptiondefault GetStatementResultIterable getStatementResultPaginator(Consumer<GetStatementResultRequest.Builder> getStatementResultRequest) throws ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException, RedshiftDataException
Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement results.
This is a variant of
getStatementResult(software.amazon.awssdk.services.redshiftdata.model.GetStatementResultRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.redshiftdata.paginators.GetStatementResultIterable responses = client.getStatementResultPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.redshiftdata.paginators.GetStatementResultIterable responses = client
.getStatementResultPaginator(request);
for (software.amazon.awssdk.services.redshiftdata.model.GetStatementResultResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.redshiftdata.paginators.GetStatementResultIterable responses = client.getStatementResultPaginator(request);
responses.iterator().forEachRemaining(....);
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
getStatementResult(software.amazon.awssdk.services.redshiftdata.model.GetStatementResultRequest)
operation.
This is a convenience which creates an instance of the GetStatementResultRequest.Builder avoiding the
need to create one manually via GetStatementResultRequest.builder()
getStatementResultRequest - A Consumer that will call methods on GetStatementResultRequest.Builder to create a
request.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.AwsServiceExceptiondefault ListDatabasesResponse listDatabases(ListDatabasesRequest listDatabasesRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
listDatabasesRequest - 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.AwsServiceExceptiondefault ListDatabasesResponse listDatabases(Consumer<ListDatabasesRequest.Builder> listDatabasesRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a convenience which creates an instance of the ListDatabasesRequest.Builder avoiding the need to
create one manually via ListDatabasesRequest.builder()
listDatabasesRequest - A Consumer that will call methods on ListDatabasesRequest.Builder to create a request.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.AwsServiceExceptiondefault ListDatabasesIterable listDatabasesPaginator(ListDatabasesRequest listDatabasesRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a variant of
listDatabases(software.amazon.awssdk.services.redshiftdata.model.ListDatabasesRequest) operation. The
return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.redshiftdata.paginators.ListDatabasesIterable responses = client.listDatabasesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.redshiftdata.paginators.ListDatabasesIterable responses = client
.listDatabasesPaginator(request);
for (software.amazon.awssdk.services.redshiftdata.model.ListDatabasesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.redshiftdata.paginators.ListDatabasesIterable responses = client.listDatabasesPaginator(request);
responses.iterator().forEachRemaining(....);
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
listDatabases(software.amazon.awssdk.services.redshiftdata.model.ListDatabasesRequest) operation.
listDatabasesRequest - 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.AwsServiceExceptiondefault ListDatabasesIterable listDatabasesPaginator(Consumer<ListDatabasesRequest.Builder> listDatabasesRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a variant of
listDatabases(software.amazon.awssdk.services.redshiftdata.model.ListDatabasesRequest) operation. The
return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.redshiftdata.paginators.ListDatabasesIterable responses = client.listDatabasesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.redshiftdata.paginators.ListDatabasesIterable responses = client
.listDatabasesPaginator(request);
for (software.amazon.awssdk.services.redshiftdata.model.ListDatabasesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.redshiftdata.paginators.ListDatabasesIterable responses = client.listDatabasesPaginator(request);
responses.iterator().forEachRemaining(....);
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
listDatabases(software.amazon.awssdk.services.redshiftdata.model.ListDatabasesRequest) operation.
This is a convenience which creates an instance of the ListDatabasesRequest.Builder avoiding the need to
create one manually via ListDatabasesRequest.builder()
listDatabasesRequest - A Consumer that will call methods on ListDatabasesRequest.Builder to create a request.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.AwsServiceExceptiondefault ListSchemasResponse listSchemas(ListSchemasRequest listSchemasRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
listSchemasRequest - 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.AwsServiceExceptiondefault ListSchemasResponse listSchemas(Consumer<ListSchemasRequest.Builder> listSchemasRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a convenience which creates an instance of the ListSchemasRequest.Builder avoiding the need to
create one manually via ListSchemasRequest.builder()
listSchemasRequest - A Consumer that will call methods on ListSchemasRequest.Builder to create a request.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.AwsServiceExceptiondefault ListSchemasIterable listSchemasPaginator(ListSchemasRequest listSchemasRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a variant of listSchemas(software.amazon.awssdk.services.redshiftdata.model.ListSchemasRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.redshiftdata.paginators.ListSchemasIterable responses = client.listSchemasPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.redshiftdata.paginators.ListSchemasIterable responses = client.listSchemasPaginator(request);
for (software.amazon.awssdk.services.redshiftdata.model.ListSchemasResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.redshiftdata.paginators.ListSchemasIterable responses = client.listSchemasPaginator(request);
responses.iterator().forEachRemaining(....);
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
listSchemas(software.amazon.awssdk.services.redshiftdata.model.ListSchemasRequest) operation.
listSchemasRequest - 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.AwsServiceExceptiondefault ListSchemasIterable listSchemasPaginator(Consumer<ListSchemasRequest.Builder> listSchemasRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a variant of listSchemas(software.amazon.awssdk.services.redshiftdata.model.ListSchemasRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.redshiftdata.paginators.ListSchemasIterable responses = client.listSchemasPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.redshiftdata.paginators.ListSchemasIterable responses = client.listSchemasPaginator(request);
for (software.amazon.awssdk.services.redshiftdata.model.ListSchemasResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.redshiftdata.paginators.ListSchemasIterable responses = client.listSchemasPaginator(request);
responses.iterator().forEachRemaining(....);
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
listSchemas(software.amazon.awssdk.services.redshiftdata.model.ListSchemasRequest) operation.
This is a convenience which creates an instance of the ListSchemasRequest.Builder avoiding the need to
create one manually via ListSchemasRequest.builder()
listSchemasRequest - A Consumer that will call methods on ListSchemasRequest.Builder to create a request.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.AwsServiceExceptiondefault ListStatementsResponse listStatements(ListStatementsRequest listStatementsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, RedshiftDataException
List of SQL statements. By default, only finished statements are shown. A token is returned to page through the statement list.
listStatementsRequest - 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.AwsServiceExceptiondefault ListStatementsResponse listStatements(Consumer<ListStatementsRequest.Builder> listStatementsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, RedshiftDataException
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 ListStatementsRequest.Builder avoiding the need to
create one manually via ListStatementsRequest.builder()
listStatementsRequest - A Consumer that will call methods on ListStatementsRequest.Builder to create a request.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.AwsServiceExceptiondefault ListStatementsIterable listStatementsPaginator(ListStatementsRequest listStatementsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, RedshiftDataException
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
listStatements(software.amazon.awssdk.services.redshiftdata.model.ListStatementsRequest) operation. The
return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.redshiftdata.paginators.ListStatementsIterable responses = client.listStatementsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.redshiftdata.paginators.ListStatementsIterable responses = client
.listStatementsPaginator(request);
for (software.amazon.awssdk.services.redshiftdata.model.ListStatementsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.redshiftdata.paginators.ListStatementsIterable responses = client.listStatementsPaginator(request);
responses.iterator().forEachRemaining(....);
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
listStatements(software.amazon.awssdk.services.redshiftdata.model.ListStatementsRequest) operation.
listStatementsRequest - 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.AwsServiceExceptiondefault ListStatementsIterable listStatementsPaginator(Consumer<ListStatementsRequest.Builder> listStatementsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, RedshiftDataException
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
listStatements(software.amazon.awssdk.services.redshiftdata.model.ListStatementsRequest) operation. The
return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.redshiftdata.paginators.ListStatementsIterable responses = client.listStatementsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.redshiftdata.paginators.ListStatementsIterable responses = client
.listStatementsPaginator(request);
for (software.amazon.awssdk.services.redshiftdata.model.ListStatementsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.redshiftdata.paginators.ListStatementsIterable responses = client.listStatementsPaginator(request);
responses.iterator().forEachRemaining(....);
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
listStatements(software.amazon.awssdk.services.redshiftdata.model.ListStatementsRequest) operation.
This is a convenience which creates an instance of the ListStatementsRequest.Builder avoiding the need to
create one manually via ListStatementsRequest.builder()
listStatementsRequest - A Consumer that will call methods on ListStatementsRequest.Builder to create a request.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.AwsServiceExceptiondefault ListTablesResponse listTables(ListTablesRequest listTablesRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
listTablesRequest - 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.AwsServiceExceptiondefault ListTablesResponse listTables(Consumer<ListTablesRequest.Builder> listTablesRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a convenience which creates an instance of the ListTablesRequest.Builder avoiding the need to
create one manually via ListTablesRequest.builder()
listTablesRequest - A Consumer that will call methods on ListTablesRequest.Builder to create a request.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.AwsServiceExceptiondefault ListTablesIterable listTablesPaginator(ListTablesRequest listTablesRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a variant of listTables(software.amazon.awssdk.services.redshiftdata.model.ListTablesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.redshiftdata.paginators.ListTablesIterable responses = client.listTablesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.redshiftdata.paginators.ListTablesIterable responses = client.listTablesPaginator(request);
for (software.amazon.awssdk.services.redshiftdata.model.ListTablesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.redshiftdata.paginators.ListTablesIterable responses = client.listTablesPaginator(request);
responses.iterator().forEachRemaining(....);
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
listTables(software.amazon.awssdk.services.redshiftdata.model.ListTablesRequest) operation.
listTablesRequest - 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.AwsServiceExceptiondefault ListTablesIterable listTablesPaginator(Consumer<ListTablesRequest.Builder> listTablesRequest) throws ValidationException, InternalServerException, DatabaseConnectionException, AwsServiceException, SdkClientException, RedshiftDataException
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 endpoint, 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 endpoint, specify the database name.
This is a variant of listTables(software.amazon.awssdk.services.redshiftdata.model.ListTablesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.redshiftdata.paginators.ListTablesIterable responses = client.listTablesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.redshiftdata.paginators.ListTablesIterable responses = client.listTablesPaginator(request);
for (software.amazon.awssdk.services.redshiftdata.model.ListTablesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.redshiftdata.paginators.ListTablesIterable responses = client.listTablesPaginator(request);
responses.iterator().forEachRemaining(....);
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
listTables(software.amazon.awssdk.services.redshiftdata.model.ListTablesRequest) operation.
This is a convenience which creates an instance of the ListTablesRequest.Builder avoiding the need to
create one manually via ListTablesRequest.builder()
listTablesRequest - A Consumer that will call methods on ListTablesRequest.Builder to create a request.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.AwsServiceExceptionstatic ServiceMetadata serviceMetadata()
Copyright © 2022. All rights reserved.