Interface RdsDataClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface RdsDataClient extends AwsClient
Service client for accessing AWS RDS DataService. This can be created using the staticbuilder()method.RDS Data API Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora DB cluster. To run these statements, you use the RDS Data API (Data API).
Data API is available with the following types of Aurora databases:
-
Aurora PostgreSQL - Serverless v2, Serverless v1, and provisioned
-
Aurora MySQL - Serverless v1 only
For more information about the Data API, see Using RDS Data API in the Amazon Aurora User Guide.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default BatchExecuteStatementResponsebatchExecuteStatement(Consumer<BatchExecuteStatementRequest.Builder> batchExecuteStatementRequest)Runs a batch SQL statement over an array of data.default BatchExecuteStatementResponsebatchExecuteStatement(BatchExecuteStatementRequest batchExecuteStatementRequest)Runs a batch SQL statement over an array of data.default BeginTransactionResponsebeginTransaction(Consumer<BeginTransactionRequest.Builder> beginTransactionRequest)Starts a SQL transaction.default BeginTransactionResponsebeginTransaction(BeginTransactionRequest beginTransactionRequest)Starts a SQL transaction.static RdsDataClientBuilderbuilder()Create a builder that can be used to configure and create aRdsDataClient.default CommitTransactionResponsecommitTransaction(Consumer<CommitTransactionRequest.Builder> commitTransactionRequest)Ends a SQL transaction started with theBeginTransactionoperation and commits the changes.default CommitTransactionResponsecommitTransaction(CommitTransactionRequest commitTransactionRequest)Ends a SQL transaction started with theBeginTransactionoperation and commits the changes.static RdsDataClientcreate()Create aRdsDataClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default ExecuteSqlResponseexecuteSql(Consumer<ExecuteSqlRequest.Builder> executeSqlRequest)Deprecated.The ExecuteSql API is deprecated, please use the ExecuteStatement API.default ExecuteSqlResponseexecuteSql(ExecuteSqlRequest executeSqlRequest)Deprecated.The ExecuteSql API is deprecated, please use the ExecuteStatement API.default ExecuteStatementResponseexecuteStatement(Consumer<ExecuteStatementRequest.Builder> executeStatementRequest)Runs a SQL statement against a database.default ExecuteStatementResponseexecuteStatement(ExecuteStatementRequest executeStatementRequest)Runs a SQL statement against a database.default RollbackTransactionResponserollbackTransaction(Consumer<RollbackTransactionRequest.Builder> rollbackTransactionRequest)Performs a rollback of a transaction.default RollbackTransactionResponserollbackTransaction(RollbackTransactionRequest rollbackTransactionRequest)Performs a rollback of a transaction.default RdsDataServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
batchExecuteStatement
default BatchExecuteStatementResponse batchExecuteStatement(BatchExecuteStatementRequest batchExecuteStatementRequest) throws SecretsErrorException, HttpEndpointNotEnabledException, DatabaseErrorException, DatabaseUnavailableException, TransactionNotFoundException, InvalidSecretException, ServiceUnavailableErrorException, ForbiddenException, DatabaseNotFoundException, AccessDeniedException, BadRequestException, StatementTimeoutException, InternalServerErrorException, AwsServiceException, SdkClientException, RdsDataException
Runs a batch SQL statement over an array of data.
You can run bulk update and insert operations for multiple records using a DML statement with different parameter sets. Bulk operations can provide a significant performance improvement over individual insert and update operations.
If a call isn't part of a transaction because it doesn't include the
transactionIDparameter, changes that result from the call are committed automatically.There isn't a fixed upper limit on the number of parameter sets. However, the maximum size of the HTTP request submitted through the Data API is 4 MiB. If the request exceeds this limit, the Data API returns an error and doesn't process the request. This 4-MiB limit includes the size of the HTTP headers and the JSON notation in the request. Thus, the number of parameter sets that you can include depends on a combination of factors, such as the size of the SQL statement and the size of each parameter set.
The response size limit is 1 MiB. If the call returns more than 1 MiB of response data, the call is terminated.
- Parameters:
batchExecuteStatementRequest- The request parameters represent the input of a SQL statement over an array of data.- Returns:
- Result of the BatchExecuteStatement operation returned by the service.
- Throws:
SecretsErrorException- There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:-
RDS Data API timed out retrieving the secret.
-
The secret provided wasn't found.
-
The secret couldn't be decrypted.
-
HttpEndpointNotEnabledException- The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.DatabaseErrorException- There was an error in processing the SQL statement.DatabaseUnavailableException- The writer instance in the DB cluster isn't available.TransactionNotFoundException- The transaction ID wasn't found.InvalidSecretException- The Secrets Manager secret used with the request isn't valid.ServiceUnavailableErrorException- The service specified by theresourceArnparameter isn't available.ForbiddenException- There are insufficient privileges to make the call.DatabaseNotFoundException- The DB cluster doesn't have a DB instance.AccessDeniedException- You don't have sufficient access to perform this action.BadRequestException- There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)StatementTimeoutException- The execution of the SQL statement timed out.InternalServerErrorException- An internal error occurred.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.RdsDataException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
batchExecuteStatement
default BatchExecuteStatementResponse batchExecuteStatement(Consumer<BatchExecuteStatementRequest.Builder> batchExecuteStatementRequest) throws SecretsErrorException, HttpEndpointNotEnabledException, DatabaseErrorException, DatabaseUnavailableException, TransactionNotFoundException, InvalidSecretException, ServiceUnavailableErrorException, ForbiddenException, DatabaseNotFoundException, AccessDeniedException, BadRequestException, StatementTimeoutException, InternalServerErrorException, AwsServiceException, SdkClientException, RdsDataException
Runs a batch SQL statement over an array of data.
You can run bulk update and insert operations for multiple records using a DML statement with different parameter sets. Bulk operations can provide a significant performance improvement over individual insert and update operations.
If a call isn't part of a transaction because it doesn't include the
transactionIDparameter, changes that result from the call are committed automatically.There isn't a fixed upper limit on the number of parameter sets. However, the maximum size of the HTTP request submitted through the Data API is 4 MiB. If the request exceeds this limit, the Data API returns an error and doesn't process the request. This 4-MiB limit includes the size of the HTTP headers and the JSON notation in the request. Thus, the number of parameter sets that you can include depends on a combination of factors, such as the size of the SQL statement and the size of each parameter set.
The response size limit is 1 MiB. If the call returns more than 1 MiB of response data, the call is terminated.
This is a convenience which creates an instance of the
BatchExecuteStatementRequest.Builderavoiding the need to create one manually viaBatchExecuteStatementRequest.builder()- Parameters:
batchExecuteStatementRequest- AConsumerthat will call methods onBatchExecuteStatementRequest.Builderto create a request. The request parameters represent the input of a SQL statement over an array of data.- Returns:
- Result of the BatchExecuteStatement operation returned by the service.
- Throws:
SecretsErrorException- There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:-
RDS Data API timed out retrieving the secret.
-
The secret provided wasn't found.
-
The secret couldn't be decrypted.
-
HttpEndpointNotEnabledException- The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.DatabaseErrorException- There was an error in processing the SQL statement.DatabaseUnavailableException- The writer instance in the DB cluster isn't available.TransactionNotFoundException- The transaction ID wasn't found.InvalidSecretException- The Secrets Manager secret used with the request isn't valid.ServiceUnavailableErrorException- The service specified by theresourceArnparameter isn't available.ForbiddenException- There are insufficient privileges to make the call.DatabaseNotFoundException- The DB cluster doesn't have a DB instance.AccessDeniedException- You don't have sufficient access to perform this action.BadRequestException- There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)StatementTimeoutException- The execution of the SQL statement timed out.InternalServerErrorException- An internal error occurred.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.RdsDataException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
beginTransaction
default BeginTransactionResponse beginTransaction(BeginTransactionRequest beginTransactionRequest) throws SecretsErrorException, HttpEndpointNotEnabledException, DatabaseErrorException, DatabaseUnavailableException, TransactionNotFoundException, InvalidSecretException, ServiceUnavailableErrorException, ForbiddenException, DatabaseNotFoundException, AccessDeniedException, BadRequestException, StatementTimeoutException, InternalServerErrorException, AwsServiceException, SdkClientException, RdsDataException
Starts a SQL transaction.
A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours.
A transaction times out if no calls use its transaction ID in three minutes. If a transaction times out before it's committed, it's rolled back automatically.
DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a separate
ExecuteStatementcall withcontinueAfterTimeoutenabled.- Parameters:
beginTransactionRequest- The request parameters represent the input of a request to start a SQL transaction.- Returns:
- Result of the BeginTransaction operation returned by the service.
- Throws:
SecretsErrorException- There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:-
RDS Data API timed out retrieving the secret.
-
The secret provided wasn't found.
-
The secret couldn't be decrypted.
-
HttpEndpointNotEnabledException- The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.DatabaseErrorException- There was an error in processing the SQL statement.DatabaseUnavailableException- The writer instance in the DB cluster isn't available.TransactionNotFoundException- The transaction ID wasn't found.InvalidSecretException- The Secrets Manager secret used with the request isn't valid.ServiceUnavailableErrorException- The service specified by theresourceArnparameter isn't available.ForbiddenException- There are insufficient privileges to make the call.DatabaseNotFoundException- The DB cluster doesn't have a DB instance.AccessDeniedException- You don't have sufficient access to perform this action.BadRequestException- There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)StatementTimeoutException- The execution of the SQL statement timed out.InternalServerErrorException- An internal error occurred.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.RdsDataException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
beginTransaction
default BeginTransactionResponse beginTransaction(Consumer<BeginTransactionRequest.Builder> beginTransactionRequest) throws SecretsErrorException, HttpEndpointNotEnabledException, DatabaseErrorException, DatabaseUnavailableException, TransactionNotFoundException, InvalidSecretException, ServiceUnavailableErrorException, ForbiddenException, DatabaseNotFoundException, AccessDeniedException, BadRequestException, StatementTimeoutException, InternalServerErrorException, AwsServiceException, SdkClientException, RdsDataException
Starts a SQL transaction.
A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours.
A transaction times out if no calls use its transaction ID in three minutes. If a transaction times out before it's committed, it's rolled back automatically.
DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a separate
ExecuteStatementcall withcontinueAfterTimeoutenabled.
This is a convenience which creates an instance of the
BeginTransactionRequest.Builderavoiding the need to create one manually viaBeginTransactionRequest.builder()- Parameters:
beginTransactionRequest- AConsumerthat will call methods onBeginTransactionRequest.Builderto create a request. The request parameters represent the input of a request to start a SQL transaction.- Returns:
- Result of the BeginTransaction operation returned by the service.
- Throws:
SecretsErrorException- There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:-
RDS Data API timed out retrieving the secret.
-
The secret provided wasn't found.
-
The secret couldn't be decrypted.
-
HttpEndpointNotEnabledException- The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.DatabaseErrorException- There was an error in processing the SQL statement.DatabaseUnavailableException- The writer instance in the DB cluster isn't available.TransactionNotFoundException- The transaction ID wasn't found.InvalidSecretException- The Secrets Manager secret used with the request isn't valid.ServiceUnavailableErrorException- The service specified by theresourceArnparameter isn't available.ForbiddenException- There are insufficient privileges to make the call.DatabaseNotFoundException- The DB cluster doesn't have a DB instance.AccessDeniedException- You don't have sufficient access to perform this action.BadRequestException- There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)StatementTimeoutException- The execution of the SQL statement timed out.InternalServerErrorException- An internal error occurred.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.RdsDataException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
commitTransaction
default CommitTransactionResponse commitTransaction(CommitTransactionRequest commitTransactionRequest) throws SecretsErrorException, HttpEndpointNotEnabledException, DatabaseErrorException, DatabaseUnavailableException, TransactionNotFoundException, InvalidSecretException, ServiceUnavailableErrorException, ForbiddenException, DatabaseNotFoundException, AccessDeniedException, BadRequestException, StatementTimeoutException, InternalServerErrorException, NotFoundException, AwsServiceException, SdkClientException, RdsDataException
Ends a SQL transaction started with the
BeginTransactionoperation and commits the changes.- Parameters:
commitTransactionRequest- The request parameters represent the input of a commit transaction request.- Returns:
- Result of the CommitTransaction operation returned by the service.
- Throws:
SecretsErrorException- There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:-
RDS Data API timed out retrieving the secret.
-
The secret provided wasn't found.
-
The secret couldn't be decrypted.
-
HttpEndpointNotEnabledException- The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.DatabaseErrorException- There was an error in processing the SQL statement.DatabaseUnavailableException- The writer instance in the DB cluster isn't available.TransactionNotFoundException- The transaction ID wasn't found.InvalidSecretException- The Secrets Manager secret used with the request isn't valid.ServiceUnavailableErrorException- The service specified by theresourceArnparameter isn't available.ForbiddenException- There are insufficient privileges to make the call.DatabaseNotFoundException- The DB cluster doesn't have a DB instance.AccessDeniedException- You don't have sufficient access to perform this action.BadRequestException- There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)StatementTimeoutException- The execution of the SQL statement timed out.InternalServerErrorException- An internal error occurred.NotFoundException- TheresourceArn,secretArn, ortransactionIdvalue can't be found.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RdsDataException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
commitTransaction
default CommitTransactionResponse commitTransaction(Consumer<CommitTransactionRequest.Builder> commitTransactionRequest) throws SecretsErrorException, HttpEndpointNotEnabledException, DatabaseErrorException, DatabaseUnavailableException, TransactionNotFoundException, InvalidSecretException, ServiceUnavailableErrorException, ForbiddenException, DatabaseNotFoundException, AccessDeniedException, BadRequestException, StatementTimeoutException, InternalServerErrorException, NotFoundException, AwsServiceException, SdkClientException, RdsDataException
Ends a SQL transaction started with the
BeginTransactionoperation and commits the changes.
This is a convenience which creates an instance of the
CommitTransactionRequest.Builderavoiding the need to create one manually viaCommitTransactionRequest.builder()- Parameters:
commitTransactionRequest- AConsumerthat will call methods onCommitTransactionRequest.Builderto create a request. The request parameters represent the input of a commit transaction request.- Returns:
- Result of the CommitTransaction operation returned by the service.
- Throws:
SecretsErrorException- There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:-
RDS Data API timed out retrieving the secret.
-
The secret provided wasn't found.
-
The secret couldn't be decrypted.
-
HttpEndpointNotEnabledException- The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.DatabaseErrorException- There was an error in processing the SQL statement.DatabaseUnavailableException- The writer instance in the DB cluster isn't available.TransactionNotFoundException- The transaction ID wasn't found.InvalidSecretException- The Secrets Manager secret used with the request isn't valid.ServiceUnavailableErrorException- The service specified by theresourceArnparameter isn't available.ForbiddenException- There are insufficient privileges to make the call.DatabaseNotFoundException- The DB cluster doesn't have a DB instance.AccessDeniedException- You don't have sufficient access to perform this action.BadRequestException- There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)StatementTimeoutException- The execution of the SQL statement timed out.InternalServerErrorException- An internal error occurred.NotFoundException- TheresourceArn,secretArn, ortransactionIdvalue can't be found.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RdsDataException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
executeSql
@Deprecated default ExecuteSqlResponse executeSql(ExecuteSqlRequest executeSqlRequest) throws AccessDeniedException, BadRequestException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, AwsServiceException, SdkClientException, RdsDataException
Deprecated.The ExecuteSql API is deprecated, please use the ExecuteStatement API.Runs one or more SQL statements.
This operation isn't supported for Aurora PostgreSQL Serverless v2 and provisioned DB clusters, and for Aurora Serverless v1 DB clusters, the operation is deprecated. Use the
BatchExecuteStatementorExecuteStatementoperation.- Parameters:
executeSqlRequest- The request parameters represent the input of a request to run one or more SQL statements.- Returns:
- Result of the ExecuteSql operation returned by the service.
- Throws:
AccessDeniedException- You don't have sufficient access to perform this action.BadRequestException- There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)InternalServerErrorException- An internal error occurred.ForbiddenException- There are insufficient privileges to make the call.ServiceUnavailableErrorException- The service specified by theresourceArnparameter isn't available.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.RdsDataException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
executeSql
@Deprecated default ExecuteSqlResponse executeSql(Consumer<ExecuteSqlRequest.Builder> executeSqlRequest) throws AccessDeniedException, BadRequestException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, AwsServiceException, SdkClientException, RdsDataException
Deprecated.The ExecuteSql API is deprecated, please use the ExecuteStatement API.Runs one or more SQL statements.
This operation isn't supported for Aurora PostgreSQL Serverless v2 and provisioned DB clusters, and for Aurora Serverless v1 DB clusters, the operation is deprecated. Use the
BatchExecuteStatementorExecuteStatementoperation.
This is a convenience which creates an instance of the
ExecuteSqlRequest.Builderavoiding the need to create one manually viaExecuteSqlRequest.builder()- Parameters:
executeSqlRequest- AConsumerthat will call methods onExecuteSqlRequest.Builderto create a request. The request parameters represent the input of a request to run one or more SQL statements.- Returns:
- Result of the ExecuteSql operation returned by the service.
- Throws:
AccessDeniedException- You don't have sufficient access to perform this action.BadRequestException- There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)InternalServerErrorException- An internal error occurred.ForbiddenException- There are insufficient privileges to make the call.ServiceUnavailableErrorException- The service specified by theresourceArnparameter isn't available.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.RdsDataException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
executeStatement
default ExecuteStatementResponse executeStatement(ExecuteStatementRequest executeStatementRequest) throws SecretsErrorException, HttpEndpointNotEnabledException, DatabaseErrorException, DatabaseUnavailableException, TransactionNotFoundException, InvalidSecretException, ServiceUnavailableErrorException, ForbiddenException, DatabaseNotFoundException, AccessDeniedException, BadRequestException, StatementTimeoutException, InternalServerErrorException, UnsupportedResultException, AwsServiceException, SdkClientException, RdsDataException
Runs a SQL statement against a database.
If a call isn't part of a transaction because it doesn't include the
transactionIDparameter, changes that result from the call are committed automatically.If the binary response data from the database is more than 1 MB, the call is terminated.
- Parameters:
executeStatementRequest- The request parameters represent the input of a request to run a SQL statement against a database.- Returns:
- Result of the ExecuteStatement operation returned by the service.
- Throws:
SecretsErrorException- There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:-
RDS Data API timed out retrieving the secret.
-
The secret provided wasn't found.
-
The secret couldn't be decrypted.
-
HttpEndpointNotEnabledException- The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.DatabaseErrorException- There was an error in processing the SQL statement.DatabaseUnavailableException- The writer instance in the DB cluster isn't available.TransactionNotFoundException- The transaction ID wasn't found.InvalidSecretException- The Secrets Manager secret used with the request isn't valid.ServiceUnavailableErrorException- The service specified by theresourceArnparameter isn't available.ForbiddenException- There are insufficient privileges to make the call.DatabaseNotFoundException- The DB cluster doesn't have a DB instance.AccessDeniedException- You don't have sufficient access to perform this action.BadRequestException- There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)StatementTimeoutException- The execution of the SQL statement timed out.InternalServerErrorException- An internal error occurred.UnsupportedResultException- There was a problem with the result because of one of the following conditions:-
It contained an unsupported data type.
-
It contained a multidimensional array.
-
The size was too large.
-
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.RdsDataException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
executeStatement
default ExecuteStatementResponse executeStatement(Consumer<ExecuteStatementRequest.Builder> executeStatementRequest) throws SecretsErrorException, HttpEndpointNotEnabledException, DatabaseErrorException, DatabaseUnavailableException, TransactionNotFoundException, InvalidSecretException, ServiceUnavailableErrorException, ForbiddenException, DatabaseNotFoundException, AccessDeniedException, BadRequestException, StatementTimeoutException, InternalServerErrorException, UnsupportedResultException, AwsServiceException, SdkClientException, RdsDataException
Runs a SQL statement against a database.
If a call isn't part of a transaction because it doesn't include the
transactionIDparameter, changes that result from the call are committed automatically.If the binary response data from the database is more than 1 MB, the call is terminated.
This is a convenience which creates an instance of the
ExecuteStatementRequest.Builderavoiding the need to create one manually viaExecuteStatementRequest.builder()- Parameters:
executeStatementRequest- AConsumerthat will call methods onExecuteStatementRequest.Builderto create a request. The request parameters represent the input of a request to run a SQL statement against a database.- Returns:
- Result of the ExecuteStatement operation returned by the service.
- Throws:
SecretsErrorException- There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:-
RDS Data API timed out retrieving the secret.
-
The secret provided wasn't found.
-
The secret couldn't be decrypted.
-
HttpEndpointNotEnabledException- The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.DatabaseErrorException- There was an error in processing the SQL statement.DatabaseUnavailableException- The writer instance in the DB cluster isn't available.TransactionNotFoundException- The transaction ID wasn't found.InvalidSecretException- The Secrets Manager secret used with the request isn't valid.ServiceUnavailableErrorException- The service specified by theresourceArnparameter isn't available.ForbiddenException- There are insufficient privileges to make the call.DatabaseNotFoundException- The DB cluster doesn't have a DB instance.AccessDeniedException- You don't have sufficient access to perform this action.BadRequestException- There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)StatementTimeoutException- The execution of the SQL statement timed out.InternalServerErrorException- An internal error occurred.UnsupportedResultException- There was a problem with the result because of one of the following conditions:-
It contained an unsupported data type.
-
It contained a multidimensional array.
-
The size was too large.
-
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.RdsDataException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
rollbackTransaction
default RollbackTransactionResponse rollbackTransaction(RollbackTransactionRequest rollbackTransactionRequest) throws SecretsErrorException, HttpEndpointNotEnabledException, DatabaseErrorException, DatabaseUnavailableException, TransactionNotFoundException, InvalidSecretException, ServiceUnavailableErrorException, ForbiddenException, DatabaseNotFoundException, AccessDeniedException, BadRequestException, StatementTimeoutException, InternalServerErrorException, NotFoundException, AwsServiceException, SdkClientException, RdsDataException
Performs a rollback of a transaction. Rolling back a transaction cancels its changes.
- Parameters:
rollbackTransactionRequest- The request parameters represent the input of a request to perform a rollback of a transaction.- Returns:
- Result of the RollbackTransaction operation returned by the service.
- Throws:
SecretsErrorException- There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:-
RDS Data API timed out retrieving the secret.
-
The secret provided wasn't found.
-
The secret couldn't be decrypted.
-
HttpEndpointNotEnabledException- The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.DatabaseErrorException- There was an error in processing the SQL statement.DatabaseUnavailableException- The writer instance in the DB cluster isn't available.TransactionNotFoundException- The transaction ID wasn't found.InvalidSecretException- The Secrets Manager secret used with the request isn't valid.ServiceUnavailableErrorException- The service specified by theresourceArnparameter isn't available.ForbiddenException- There are insufficient privileges to make the call.DatabaseNotFoundException- The DB cluster doesn't have a DB instance.AccessDeniedException- You don't have sufficient access to perform this action.BadRequestException- There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)StatementTimeoutException- The execution of the SQL statement timed out.InternalServerErrorException- An internal error occurred.NotFoundException- TheresourceArn,secretArn, ortransactionIdvalue can't be found.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RdsDataException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
rollbackTransaction
default RollbackTransactionResponse rollbackTransaction(Consumer<RollbackTransactionRequest.Builder> rollbackTransactionRequest) throws SecretsErrorException, HttpEndpointNotEnabledException, DatabaseErrorException, DatabaseUnavailableException, TransactionNotFoundException, InvalidSecretException, ServiceUnavailableErrorException, ForbiddenException, DatabaseNotFoundException, AccessDeniedException, BadRequestException, StatementTimeoutException, InternalServerErrorException, NotFoundException, AwsServiceException, SdkClientException, RdsDataException
Performs a rollback of a transaction. Rolling back a transaction cancels its changes.
This is a convenience which creates an instance of the
RollbackTransactionRequest.Builderavoiding the need to create one manually viaRollbackTransactionRequest.builder()- Parameters:
rollbackTransactionRequest- AConsumerthat will call methods onRollbackTransactionRequest.Builderto create a request. The request parameters represent the input of a request to perform a rollback of a transaction.- Returns:
- Result of the RollbackTransaction operation returned by the service.
- Throws:
SecretsErrorException- There was a problem with the Secrets Manager secret used with the request, caused by one of the following conditions:-
RDS Data API timed out retrieving the secret.
-
The secret provided wasn't found.
-
The secret couldn't be decrypted.
-
HttpEndpointNotEnabledException- The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.DatabaseErrorException- There was an error in processing the SQL statement.DatabaseUnavailableException- The writer instance in the DB cluster isn't available.TransactionNotFoundException- The transaction ID wasn't found.InvalidSecretException- The Secrets Manager secret used with the request isn't valid.ServiceUnavailableErrorException- The service specified by theresourceArnparameter isn't available.ForbiddenException- There are insufficient privileges to make the call.DatabaseNotFoundException- The DB cluster doesn't have a DB instance.AccessDeniedException- You don't have sufficient access to perform this action.BadRequestException- There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)StatementTimeoutException- The execution of the SQL statement timed out.InternalServerErrorException- An internal error occurred.NotFoundException- TheresourceArn,secretArn, ortransactionIdvalue can't be found.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.RdsDataException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
create
static RdsDataClient create()
Create aRdsDataClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static RdsDataClientBuilder builder()
Create a builder that can be used to configure and create aRdsDataClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default RdsDataServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-