Class: AWS.RDSDataService
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.RDSDataService
- Identifier:
- rdsdataservice
- API Version:
- 2018-08-01
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
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.
Sending a Request Using RDSDataService
var rdsdataservice = new AWS.RDSDataService();
rdsdataservice.batchExecuteStatement(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the RDSDataService object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var rdsdataservice = new AWS.RDSDataService({apiVersion: '2018-08-01'});
You can also set the API version globally in AWS.config.apiVersions
using
the rdsdataservice service identifier:
AWS.config.apiVersions = {
rdsdataservice: '2018-08-01',
// other service API versions
};
var rdsdataservice = new AWS.RDSDataService();
Constructor Summary collapse
-
new AWS.RDSDataService(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
batchExecuteStatement(params = {}, callback) ⇒ AWS.Request
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.
-
beginTransaction(params = {}, callback) ⇒ AWS.Request
Starts a SQL transaction.
Note: A transaction can run for a maximum of 24 hours.- commitTransaction(params = {}, callback) ⇒ AWS.Request
Ends a SQL transaction started with the
BeginTransaction
operation and commits the changes..
- executeSql(params = {}, callback) ⇒ AWS.Request
Runs one or more SQL statements.
Note: 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.- executeStatement(params = {}, callback) ⇒ AWS.Request
Runs a SQL statement against a database.
Note: If a call isn't part of a transaction because it doesn't include thetransactionID
parameter, changes that result from the call are committed automatically.- rollbackTransaction(params = {}, callback) ⇒ AWS.Request
Performs a rollback of a transaction.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.RDSDataService(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
Method Details
batchExecuteStatement(params = {}, callback) ⇒ AWS.Request
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.
Note: If a call isn't part of a transaction because it doesn't include thetransactionID
parameter, 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.beginTransaction(params = {}, callback) ⇒ AWS.Request
Starts a SQL transaction.
Note: 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 separateExecuteStatement
call withcontinueAfterTimeout
enabled.commitTransaction(params = {}, callback) ⇒ AWS.Request
Ends a SQL transaction started with the
BeginTransaction
operation and commits the changes.executeSql(params = {}, callback) ⇒ AWS.Request
Runs one or more SQL statements.
Note: 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 theBatchExecuteStatement
orExecuteStatement
operation.executeStatement(params = {}, callback) ⇒ AWS.Request
Runs a SQL statement against a database.
Note: If a call isn't part of a transaction because it doesn't include thetransactionID
parameter, 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. - commitTransaction(params = {}, callback) ⇒ AWS.Request