@Generated(value="software.amazon.awssdk:codegen") public interface RdsDataClient extends SdkClient
builder() method.
Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora Serverless DB cluster. To run these statements, you work with the Data Service API.
For more information about the Data Service API, see Using the Data API for Aurora Serverless in the Amazon Aurora User Guide.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
default BatchExecuteStatementResponse |
batchExecuteStatement(BatchExecuteStatementRequest batchExecuteStatementRequest)
Runs a batch SQL statement over an array of data.
|
default BatchExecuteStatementResponse |
batchExecuteStatement(Consumer<BatchExecuteStatementRequest.Builder> batchExecuteStatementRequest)
Runs a batch SQL statement over an array of data.
|
default BeginTransactionResponse |
beginTransaction(BeginTransactionRequest beginTransactionRequest)
Starts a SQL transaction.
|
default BeginTransactionResponse |
beginTransaction(Consumer<BeginTransactionRequest.Builder> beginTransactionRequest)
Starts a SQL transaction.
|
static RdsDataClientBuilder |
builder()
Create a builder that can be used to configure and create a
RdsDataClient. |
default CommitTransactionResponse |
commitTransaction(CommitTransactionRequest commitTransactionRequest)
Ends a SQL transaction started with the
BeginTransaction operation and commits the changes. |
default CommitTransactionResponse |
commitTransaction(Consumer<CommitTransactionRequest.Builder> commitTransactionRequest)
Ends a SQL transaction started with the
BeginTransaction operation and commits the changes. |
static RdsDataClient |
create()
Create a
RdsDataClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default ExecuteSqlResponse |
executeSql(Consumer<ExecuteSqlRequest.Builder> executeSqlRequest)
Runs one or more SQL statements.
|
default ExecuteSqlResponse |
executeSql(ExecuteSqlRequest executeSqlRequest)
Runs one or more SQL statements.
|
default ExecuteStatementResponse |
executeStatement(Consumer<ExecuteStatementRequest.Builder> executeStatementRequest)
Runs a SQL statement against a database.
|
default ExecuteStatementResponse |
executeStatement(ExecuteStatementRequest executeStatementRequest)
Runs a SQL statement against a database.
|
default RollbackTransactionResponse |
rollbackTransaction(Consumer<RollbackTransactionRequest.Builder> rollbackTransactionRequest)
Performs a rollback of a transaction.
|
default RollbackTransactionResponse |
rollbackTransaction(RollbackTransactionRequest rollbackTransactionRequest)
Performs a rollback of a transaction.
|
static ServiceMetadata |
serviceMetadata() |
serviceNameclosestatic final String SERVICE_NAME
static RdsDataClient create()
RdsDataClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static RdsDataClientBuilder builder()
RdsDataClient.default BatchExecuteStatementResponse batchExecuteStatement(BatchExecuteStatementRequest batchExecuteStatementRequest) throws BadRequestException, StatementTimeoutException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, 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 transactionID parameter,
changes that result from the call are committed automatically.
batchExecuteStatementRequest - The request parameters represent the input of a SQL statement over an array of data.BadRequestException - There is an error in the call or in a SQL statement.StatementTimeoutException - The execution of the SQL statement timed out.InternalServerErrorException - An internal error occurred.ForbiddenException - There are insufficient privileges to make the call.ServiceUnavailableErrorException - The service specified by the resourceArn parameter is not 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.AwsServiceExceptiondefault BatchExecuteStatementResponse batchExecuteStatement(Consumer<BatchExecuteStatementRequest.Builder> batchExecuteStatementRequest) throws BadRequestException, StatementTimeoutException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, 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 transactionID parameter,
changes that result from the call are committed automatically.
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 BatchExecuteStatementRequest.Builder to create a
request. The request parameters represent the input of a SQL statement over an array of data.BadRequestException - There is an error in the call or in a SQL statement.StatementTimeoutException - The execution of the SQL statement timed out.InternalServerErrorException - An internal error occurred.ForbiddenException - There are insufficient privileges to make the call.ServiceUnavailableErrorException - The service specified by the resourceArn parameter is not 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.AwsServiceExceptiondefault BeginTransactionResponse beginTransaction(BeginTransactionRequest beginTransactionRequest) throws BadRequestException, StatementTimeoutException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, AwsServiceException, SdkClientException, RdsDataException
Starts a SQL transaction.
<important> <p>A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours.</p> <p>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.</p> <p>DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a separate <code>ExecuteStatement</code> call with <code>continueAfterTimeout</code> enabled.</p> </important>
beginTransactionRequest - The request parameters represent the input of a request to start a SQL transaction.BadRequestException - There is an error in the call or in a SQL statement.StatementTimeoutException - The execution of the SQL statement timed out.InternalServerErrorException - An internal error occurred.ForbiddenException - There are insufficient privileges to make the call.ServiceUnavailableErrorException - The service specified by the resourceArn parameter is not 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.AwsServiceExceptiondefault BeginTransactionResponse beginTransaction(Consumer<BeginTransactionRequest.Builder> beginTransactionRequest) throws BadRequestException, StatementTimeoutException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, AwsServiceException, SdkClientException, RdsDataException
Starts a SQL transaction.
<important> <p>A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after 24 hours.</p> <p>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.</p> <p>DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a separate <code>ExecuteStatement</code> call with <code>continueAfterTimeout</code> enabled.</p> </important>
This is a convenience which creates an instance of the BeginTransactionRequest.Builder avoiding the need
to create one manually via BeginTransactionRequest.builder()
beginTransactionRequest - A Consumer that will call methods on BeginTransactionRequest.Builder to create a request.
The request parameters represent the input of a request to start a SQL transaction.BadRequestException - There is an error in the call or in a SQL statement.StatementTimeoutException - The execution of the SQL statement timed out.InternalServerErrorException - An internal error occurred.ForbiddenException - There are insufficient privileges to make the call.ServiceUnavailableErrorException - The service specified by the resourceArn parameter is not 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.AwsServiceExceptiondefault CommitTransactionResponse commitTransaction(CommitTransactionRequest commitTransactionRequest) throws BadRequestException, StatementTimeoutException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, NotFoundException, AwsServiceException, SdkClientException, RdsDataException
Ends a SQL transaction started with the BeginTransaction operation and commits the changes.
commitTransactionRequest - The request parameters represent the input of a commit transaction request.BadRequestException - There is an error in the call or in a SQL statement.StatementTimeoutException - The execution of the SQL statement timed out.InternalServerErrorException - An internal error occurred.ForbiddenException - There are insufficient privileges to make the call.ServiceUnavailableErrorException - The service specified by the resourceArn parameter is not available.NotFoundException - The resourceArn, secretArn, or transactionId value 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.AwsServiceExceptiondefault CommitTransactionResponse commitTransaction(Consumer<CommitTransactionRequest.Builder> commitTransactionRequest) throws BadRequestException, StatementTimeoutException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, NotFoundException, AwsServiceException, SdkClientException, RdsDataException
Ends a SQL transaction started with the BeginTransaction operation and commits the changes.
This is a convenience which creates an instance of the CommitTransactionRequest.Builder avoiding the need
to create one manually via CommitTransactionRequest.builder()
commitTransactionRequest - A Consumer that will call methods on CommitTransactionRequest.Builder to create a request.
The request parameters represent the input of a commit transaction request.BadRequestException - There is an error in the call or in a SQL statement.StatementTimeoutException - The execution of the SQL statement timed out.InternalServerErrorException - An internal error occurred.ForbiddenException - There are insufficient privileges to make the call.ServiceUnavailableErrorException - The service specified by the resourceArn parameter is not available.NotFoundException - The resourceArn, secretArn, or transactionId value 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.AwsServiceExceptiondefault ExecuteSqlResponse executeSql(ExecuteSqlRequest executeSqlRequest) throws BadRequestException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, AwsServiceException, SdkClientException, RdsDataException
Runs one or more SQL statements.
This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement
operation.
executeSqlRequest - The request parameters represent the input of a request to run one or more SQL statements.BadRequestException - There is an error in the call or in a SQL statement.InternalServerErrorException - An internal error occurred.ForbiddenException - There are insufficient privileges to make the call.ServiceUnavailableErrorException - The service specified by the resourceArn parameter is not 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.AwsServiceExceptiondefault ExecuteSqlResponse executeSql(Consumer<ExecuteSqlRequest.Builder> executeSqlRequest) throws BadRequestException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, AwsServiceException, SdkClientException, RdsDataException
Runs one or more SQL statements.
This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement
operation.
This is a convenience which creates an instance of the ExecuteSqlRequest.Builder avoiding the need to
create one manually via ExecuteSqlRequest.builder()
executeSqlRequest - A Consumer that will call methods on ExecuteSqlRequest.Builder to create a request. The
request parameters represent the input of a request to run one or more SQL statements.BadRequestException - There is an error in the call or in a SQL statement.InternalServerErrorException - An internal error occurred.ForbiddenException - There are insufficient privileges to make the call.ServiceUnavailableErrorException - The service specified by the resourceArn parameter is not 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.AwsServiceExceptiondefault ExecuteStatementResponse executeStatement(ExecuteStatementRequest executeStatementRequest) throws BadRequestException, StatementTimeoutException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, 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 transactionID parameter,
changes that result from the call are committed automatically.
The response size limit is 1 MB. If the call returns more than 1 MB of response data, the call is terminated.
executeStatementRequest - The request parameters represent the input of a request to run a SQL statement against a database.BadRequestException - There is an error in the call or in a SQL statement.StatementTimeoutException - The execution of the SQL statement timed out.InternalServerErrorException - An internal error occurred.ForbiddenException - There are insufficient privileges to make the call.ServiceUnavailableErrorException - The service specified by the resourceArn parameter is not 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.AwsServiceExceptiondefault ExecuteStatementResponse executeStatement(Consumer<ExecuteStatementRequest.Builder> executeStatementRequest) throws BadRequestException, StatementTimeoutException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, 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 transactionID parameter,
changes that result from the call are committed automatically.
The response size limit is 1 MB. If the call returns more than 1 MB of response data, the call is terminated.
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 ExecuteStatementRequest.Builder to create a request.
The request parameters represent the input of a request to run a SQL statement against a database.BadRequestException - There is an error in the call or in a SQL statement.StatementTimeoutException - The execution of the SQL statement timed out.InternalServerErrorException - An internal error occurred.ForbiddenException - There are insufficient privileges to make the call.ServiceUnavailableErrorException - The service specified by the resourceArn parameter is not 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.AwsServiceExceptiondefault RollbackTransactionResponse rollbackTransaction(RollbackTransactionRequest rollbackTransactionRequest) throws BadRequestException, StatementTimeoutException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, NotFoundException, AwsServiceException, SdkClientException, RdsDataException
Performs a rollback of a transaction. Rolling back a transaction cancels its changes.
rollbackTransactionRequest - The request parameters represent the input of a request to perform a rollback of a transaction.BadRequestException - There is an error in the call or in a SQL statement.StatementTimeoutException - The execution of the SQL statement timed out.InternalServerErrorException - An internal error occurred.ForbiddenException - There are insufficient privileges to make the call.ServiceUnavailableErrorException - The service specified by the resourceArn parameter is not available.NotFoundException - The resourceArn, secretArn, or transactionId value 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.AwsServiceExceptiondefault RollbackTransactionResponse rollbackTransaction(Consumer<RollbackTransactionRequest.Builder> rollbackTransactionRequest) throws BadRequestException, StatementTimeoutException, InternalServerErrorException, ForbiddenException, ServiceUnavailableErrorException, 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.Builder avoiding the
need to create one manually via RollbackTransactionRequest.builder()
rollbackTransactionRequest - A Consumer that will call methods on RollbackTransactionRequest.Builder to create a
request. The request parameters represent the input of a request to perform a rollback of a transaction.BadRequestException - There is an error in the call or in a SQL statement.StatementTimeoutException - The execution of the SQL statement timed out.InternalServerErrorException - An internal error occurred.ForbiddenException - There are insufficient privileges to make the call.ServiceUnavailableErrorException - The service specified by the resourceArn parameter is not available.NotFoundException - The resourceArn, secretArn, or transactionId value 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.AwsServiceExceptionstatic ServiceMetadata serviceMetadata()
Copyright © 2021. All rights reserved.