You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

Class: AWS.RDSDataService

Inherits:
AWS.Service show all
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 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.

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();

Version:

  • 2018-08-01

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

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.

Examples:

Constructing a RDSDataService object

var rdsdataservice = new AWS.RDSDataService({apiVersion: '2018-08-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.RDSDataService.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.RDSDataService.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.RDSDataService.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

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.

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.

Service Reference:

Examples:

Calling the batchExecuteStatement operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  secretArn: 'STRING_VALUE', /* required */
  sql: 'STRING_VALUE', /* required */
  database: 'STRING_VALUE',
  parameterSets: [
    [
      {
        name: 'STRING_VALUE',
        typeHint: JSON | UUID | TIMESTAMP | DATE | TIME | DECIMAL,
        value: {
          arrayValue: { /* ArrayValue */
            arrayValues: [
              /* recursive ArrayValue */,
              /* more items */
            ],
            booleanValues: [
              true || false,
              /* more items */
            ],
            doubleValues: [
              'NUMBER_VALUE',
              /* more items */
            ],
            longValues: [
              'NUMBER_VALUE',
              /* more items */
            ],
            stringValues: [
              'STRING_VALUE',
              /* more items */
            ]
          },
          blobValue: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
          booleanValue: true || false,
          doubleValue: 'NUMBER_VALUE',
          isNull: true || false,
          longValue: 'NUMBER_VALUE',
          stringValue: 'STRING_VALUE'
        }
      },
      /* more items */
    ],
    /* more items */
  ],
  schema: 'STRING_VALUE',
  transactionId: 'STRING_VALUE'
};
rdsdataservice.batchExecuteStatement(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • database — (String)

      The name of the database.

    • parameterSets — (Array<Array<map>>)

      The parameter set for the batch operation.

      The SQL statement is executed as many times as the number of parameter sets provided. To execute a SQL statement with no parameters, use one of the following options:

      • Specify one or more empty parameter sets.

      • Use the ExecuteStatement operation instead of the BatchExecuteStatement operation.

      Note: Array parameters are not supported.
      • name — (String)

        The name of the parameter.

      • typeHint — (String)

        A hint that specifies the correct object type for data type mapping. Possible values are as follows:

        • DATE - The corresponding String parameter value is sent as an object of DATE type to the database. The accepted format is YYYY-MM-DD.

        • DECIMAL - The corresponding String parameter value is sent as an object of DECIMAL type to the database.

        • JSON - The corresponding String parameter value is sent as an object of JSON type to the database.

        • TIME - The corresponding String parameter value is sent as an object of TIME type to the database. The accepted format is HH:MM:SS[.FFF].

        • TIMESTAMP - The corresponding String parameter value is sent as an object of TIMESTAMP type to the database. The accepted format is YYYY-MM-DD HH:MM:SS[.FFF].

        • UUID - The corresponding String parameter value is sent as an object of UUID type to the database.

        Possible values include:
        • "JSON"
        • "UUID"
        • "TIMESTAMP"
        • "DATE"
        • "TIME"
        • "DECIMAL"
      • value — (map)

        The value of the parameter.

        • arrayValue — (map)

          An array of values.

          • arrayValues — (Array<map>)

            An array of arrays.

          • booleanValues — (Array<Boolean>)

            An array of Boolean values.

          • doubleValues — (Array<Float>)

            An array of integers.

          • longValues — (Array<Integer>)

            An array of floating point numbers.

          • stringValues — (Array<String>)

            An array of strings.

        • blobValue — (Buffer, Typed Array, Blob, String)

          A value of BLOB data type.

        • booleanValue — (Boolean)

          A value of Boolean data type.

        • doubleValue — (Float)

          A value of double data type.

        • isNull — (Boolean)

          A NULL value.

        • longValue — (Integer)

          A value of long data type.

        • stringValue — (String)

          A value of string data type.

    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.

    • schema — (String)

      The name of the database schema.

    • secretArn — (String)

      The name or ARN of the secret that enables access to the DB cluster.

    • sql — (String)

      The SQL statement to run.

    • transactionId — (String)

      The identifier of a transaction that was started by using the BeginTransaction operation. Specify the transaction ID of the transaction that you want to include the SQL statement in.

      If the SQL statement is not part of a transaction, don't set this parameter.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • updateResults — (Array<map>)

        The execution results of each batch entry.

        • generatedFields — (Array<map>)

          Values for fields generated during the request.

          • arrayValue — (map)

            An array of values.

            • arrayValues — (Array<map>)

              An array of arrays.

            • booleanValues — (Array<Boolean>)

              An array of Boolean values.

            • doubleValues — (Array<Float>)

              An array of integers.

            • longValues — (Array<Integer>)

              An array of floating point numbers.

            • stringValues — (Array<String>)

              An array of strings.

          • blobValue — (Buffer, Typed Array, Blob, String)

            A value of BLOB data type.

          • booleanValue — (Boolean)

            A value of Boolean data type.

          • doubleValue — (Float)

            A value of double data type.

          • isNull — (Boolean)

            A NULL value.

          • longValue — (Integer)

            A value of long data type.

          • stringValue — (String)

            A value of string data type.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

beginTransaction(params = {}, callback) ⇒ AWS.Request

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> 

Service Reference:

Examples:

Calling the beginTransaction operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  secretArn: 'STRING_VALUE', /* required */
  database: 'STRING_VALUE',
  schema: 'STRING_VALUE'
};
rdsdataservice.beginTransaction(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • database — (String)

      The name of the database.

    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.

    • schema — (String)

      The name of the database schema.

    • secretArn — (String)

      The name or ARN of the secret that enables access to the DB cluster.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • transactionId — (String)

        The transaction ID of the transaction started by the call.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

commitTransaction(params = {}, callback) ⇒ AWS.Request

Ends a SQL transaction started with the BeginTransaction operation and commits the changes.

Service Reference:

Examples:

Calling the commitTransaction operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  secretArn: 'STRING_VALUE', /* required */
  transactionId: 'STRING_VALUE' /* required */
};
rdsdataservice.commitTransaction(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.

    • secretArn — (String)

      The name or ARN of the secret that enables access to the DB cluster.

    • transactionId — (String)

      The identifier of the transaction to end and commit.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • transactionStatus — (String)

        The status of the commit operation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

executeSql(params = {}, callback) ⇒ AWS.Request

Runs one or more SQL statements.

This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation.

Service Reference:

Examples:

Calling the executeSql operation

var params = {
  awsSecretStoreArn: 'STRING_VALUE', /* required */
  dbClusterOrInstanceArn: 'STRING_VALUE', /* required */
  sqlStatements: 'STRING_VALUE', /* required */
  database: 'STRING_VALUE',
  schema: 'STRING_VALUE'
};
rdsdataservice.executeSql(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • awsSecretStoreArn — (String)

      The Amazon Resource Name (ARN) of the secret that enables access to the DB cluster.

    • database — (String)

      The name of the database.

    • dbClusterOrInstanceArn — (String)

      The ARN of the Aurora Serverless DB cluster.

    • schema — (String)

      The name of the database schema.

    • sqlStatements — (String)

      One or more SQL statements to run on the DB cluster.

      You can separate SQL statements from each other with a semicolon (;). Any valid SQL statement is permitted, including data definition, data manipulation, and commit statements.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • sqlStatementResults — (Array<map>)

        The results of the SQL statement or statements.

        • numberOfRecordsUpdated — (Integer)

          The number of records updated by a SQL statement.

        • resultFrame — (map)

          The result set of the SQL statement.

          • records — (Array<map>)

            The records in the result set.

            • values — (Array<map>)

              The values returned in the record.

              • arrayValues — (Array<map>)

                An array of column values.

              • bigIntValue — (Integer)

                A value for a column of big integer data type.

              • bitValue — (Boolean)

                A value for a column of BIT data type.

              • blobValue — (Buffer, Typed Array, Blob, String)

                A value for a column of BLOB data type.

              • doubleValue — (Float)

                A value for a column of double data type.

              • intValue — (Integer)

                A value for a column of integer data type.

              • isNull — (Boolean)

                A NULL value.

              • realValue — (Float)

                A value for a column of real data type.

              • stringValue — (String)

                A value for a column of string data type.

              • structValue — (map)

                A value for a column of STRUCT data type.

                • attributes — (Array<map>)

                  The attributes returned in the record.

          • resultSetMetadata — (map)

            The result-set metadata in the result set.

            • columnCount — (Integer)

              The number of columns in the result set.

            • columnMetadata — (Array<map>)

              The metadata of the columns in the result set.

              • arrayBaseColumnType — (Integer)

                The type of the column.

              • isAutoIncrement — (Boolean)

                A value that indicates whether the column increments automatically.

              • isCaseSensitive — (Boolean)

                A value that indicates whether the column is case-sensitive.

              • isCurrency — (Boolean)

                A value that indicates whether the column contains currency values.

              • isSigned — (Boolean)

                A value that indicates whether an integer column is signed.

              • label — (String)

                The label for the column.

              • name — (String)

                The name of the column.

              • nullable — (Integer)

                A value that indicates whether the column is nullable.

              • precision — (Integer)

                The precision value of a decimal number column.

              • scale — (Integer)

                The scale value of a decimal number column.

              • schemaName — (String)

                The name of the schema that owns the table that includes the column.

              • tableName — (String)

                The name of the table that includes the column.

              • type — (Integer)

                The type of the column.

              • typeName — (String)

                The database-specific data type of the column.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

executeStatement(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the executeStatement operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  secretArn: 'STRING_VALUE', /* required */
  sql: 'STRING_VALUE', /* required */
  continueAfterTimeout: true || false,
  database: 'STRING_VALUE',
  includeResultMetadata: true || false,
  parameters: [
    {
      name: 'STRING_VALUE',
      typeHint: JSON | UUID | TIMESTAMP | DATE | TIME | DECIMAL,
      value: {
        arrayValue: { /* ArrayValue */
          arrayValues: [
            /* recursive ArrayValue */,
            /* more items */
          ],
          booleanValues: [
            true || false,
            /* more items */
          ],
          doubleValues: [
            'NUMBER_VALUE',
            /* more items */
          ],
          longValues: [
            'NUMBER_VALUE',
            /* more items */
          ],
          stringValues: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        blobValue: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
        booleanValue: true || false,
        doubleValue: 'NUMBER_VALUE',
        isNull: true || false,
        longValue: 'NUMBER_VALUE',
        stringValue: 'STRING_VALUE'
      }
    },
    /* more items */
  ],
  resultSetOptions: {
    decimalReturnType: STRING | DOUBLE_OR_LONG
  },
  schema: 'STRING_VALUE',
  transactionId: 'STRING_VALUE'
};
rdsdataservice.executeStatement(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • continueAfterTimeout — (Boolean)

      A value that indicates whether to continue running the statement after the call times out. By default, the statement stops running when the call times out.

      For DDL statements, we recommend continuing to run the statement after the call times out. When a DDL statement terminates before it is finished running, it can result in errors and possibly corrupted data structures.

    • database — (String)

      The name of the database.

    • includeResultMetadata — (Boolean)

      A value that indicates whether to include metadata in the results.

    • parameters — (Array<map>)

      The parameters for the SQL statement.

      Note: Array parameters are not supported.
      • name — (String)

        The name of the parameter.

      • typeHint — (String)

        A hint that specifies the correct object type for data type mapping. Possible values are as follows:

        • DATE - The corresponding String parameter value is sent as an object of DATE type to the database. The accepted format is YYYY-MM-DD.

        • DECIMAL - The corresponding String parameter value is sent as an object of DECIMAL type to the database.

        • JSON - The corresponding String parameter value is sent as an object of JSON type to the database.

        • TIME - The corresponding String parameter value is sent as an object of TIME type to the database. The accepted format is HH:MM:SS[.FFF].

        • TIMESTAMP - The corresponding String parameter value is sent as an object of TIMESTAMP type to the database. The accepted format is YYYY-MM-DD HH:MM:SS[.FFF].

        • UUID - The corresponding String parameter value is sent as an object of UUID type to the database.

        Possible values include:
        • "JSON"
        • "UUID"
        • "TIMESTAMP"
        • "DATE"
        • "TIME"
        • "DECIMAL"
      • value — (map)

        The value of the parameter.

        • arrayValue — (map)

          An array of values.

          • arrayValues — (Array<map>)

            An array of arrays.

          • booleanValues — (Array<Boolean>)

            An array of Boolean values.

          • doubleValues — (Array<Float>)

            An array of integers.

          • longValues — (Array<Integer>)

            An array of floating point numbers.

          • stringValues — (Array<String>)

            An array of strings.

        • blobValue — (Buffer, Typed Array, Blob, String)

          A value of BLOB data type.

        • booleanValue — (Boolean)

          A value of Boolean data type.

        • doubleValue — (Float)

          A value of double data type.

        • isNull — (Boolean)

          A NULL value.

        • longValue — (Integer)

          A value of long data type.

        • stringValue — (String)

          A value of string data type.

    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.

    • resultSetOptions — (map)

      Options that control how the result set is returned.

      • decimalReturnType — (String)

        A value that indicates how a field of DECIMAL type is represented in the response. The value of STRING, the default, specifies that it is converted to a String value. The value of DOUBLE_OR_LONG specifies that it is converted to a Long value if its scale is 0, or to a Double value otherwise.

        Conversion to Double or Long can result in roundoff errors due to precision loss. We recommend converting to String, especially when working with currency values.

        Possible values include:
        • "STRING"
        • "DOUBLE_OR_LONG"
    • schema — (String)

      The name of the database schema.

      Note: Currently, the schema parameter isn't supported.
    • secretArn — (String)

      The name or ARN of the secret that enables access to the DB cluster.

    • sql — (String)

      The SQL statement to run.

    • transactionId — (String)

      The identifier of a transaction that was started by using the BeginTransaction operation. Specify the transaction ID of the transaction that you want to include the SQL statement in.

      If the SQL statement is not part of a transaction, don't set this parameter.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • columnMetadata — (Array<map>)

        Metadata for the columns included in the results.

        • arrayBaseColumnType — (Integer)

          The type of the column.

        • isAutoIncrement — (Boolean)

          A value that indicates whether the column increments automatically.

        • isCaseSensitive — (Boolean)

          A value that indicates whether the column is case-sensitive.

        • isCurrency — (Boolean)

          A value that indicates whether the column contains currency values.

        • isSigned — (Boolean)

          A value that indicates whether an integer column is signed.

        • label — (String)

          The label for the column.

        • name — (String)

          The name of the column.

        • nullable — (Integer)

          A value that indicates whether the column is nullable.

        • precision — (Integer)

          The precision value of a decimal number column.

        • scale — (Integer)

          The scale value of a decimal number column.

        • schemaName — (String)

          The name of the schema that owns the table that includes the column.

        • tableName — (String)

          The name of the table that includes the column.

        • type — (Integer)

          The type of the column.

        • typeName — (String)

          The database-specific data type of the column.

      • generatedFields — (Array<map>)

        Values for fields generated during the request.

         <note> <p>The <code>generatedFields</code> data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the <code>RETURNING</code> clause. For more information, see <a href="https://www.postgresql.org/docs/10/dml-returning.html&quot;&gt;Returning Data From Modified Rows</a> in the PostgreSQL documentation.</p> </note> 
        • arrayValue — (map)

          An array of values.

          • arrayValues — (Array<map>)

            An array of arrays.

          • booleanValues — (Array<Boolean>)

            An array of Boolean values.

          • doubleValues — (Array<Float>)

            An array of integers.

          • longValues — (Array<Integer>)

            An array of floating point numbers.

          • stringValues — (Array<String>)

            An array of strings.

        • blobValue — (Buffer, Typed Array, Blob, String)

          A value of BLOB data type.

        • booleanValue — (Boolean)

          A value of Boolean data type.

        • doubleValue — (Float)

          A value of double data type.

        • isNull — (Boolean)

          A NULL value.

        • longValue — (Integer)

          A value of long data type.

        • stringValue — (String)

          A value of string data type.

      • numberOfRecordsUpdated — (Integer)

        The number of records updated by the request.

      • records — (Array<Array<map>>)

        The records returned by the SQL statement.

        • arrayValue — (map)

          An array of values.

          • arrayValues — (Array<map>)

            An array of arrays.

          • booleanValues — (Array<Boolean>)

            An array of Boolean values.

          • doubleValues — (Array<Float>)

            An array of integers.

          • longValues — (Array<Integer>)

            An array of floating point numbers.

          • stringValues — (Array<String>)

            An array of strings.

        • blobValue — (Buffer, Typed Array, Blob, String)

          A value of BLOB data type.

        • booleanValue — (Boolean)

          A value of Boolean data type.

        • doubleValue — (Float)

          A value of double data type.

        • isNull — (Boolean)

          A NULL value.

        • longValue — (Integer)

          A value of long data type.

        • stringValue — (String)

          A value of string data type.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

rollbackTransaction(params = {}, callback) ⇒ AWS.Request

Performs a rollback of a transaction. Rolling back a transaction cancels its changes.

Service Reference:

Examples:

Calling the rollbackTransaction operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  secretArn: 'STRING_VALUE', /* required */
  transactionId: 'STRING_VALUE' /* required */
};
rdsdataservice.rollbackTransaction(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.

    • secretArn — (String)

      The name or ARN of the secret that enables access to the DB cluster.

    • transactionId — (String)

      The identifier of the transaction to roll back.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • transactionStatus — (String)

        The status of the rollback operation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.