SDK for PHP 3.x

Client: Aws\RDSDataService\RDSDataServiceClient
Service ID: rds-data
Version: 2018-08-01

This page describes the parameters and results for the operations of the AWS RDS DataService (2018-08-01), and shows how to use the Aws\RDSDataService\RDSDataServiceClient object to call the described operations. This documentation is specific to the 2018-08-01 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

BatchExecuteStatement ( array $params = [] )
Runs a batch SQL statement over an array of data.
BeginTransaction ( array $params = [] )
Starts a SQL transaction.
CommitTransaction ( array $params = [] )
Ends a SQL transaction started with the BeginTransaction operation and commits the changes.
ExecuteSql ( array $params = [] )
Runs one or more SQL statements.
ExecuteStatement ( array $params = [] )
Runs a SQL statement against a database.
RollbackTransaction ( array $params = [] )
Performs a rollback of a transaction.

Operations

BatchExecuteStatement

$result = $client->batchExecuteStatement([/* ... */]);
$promise = $client->batchExecuteStatementAsync([/* ... */]);

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.

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.

Parameter Syntax

$result = $client->batchExecuteStatement([
    'database' => '<string>',
    'parameterSets' => [
        [
            [
                'name' => '<string>',
                'typeHint' => 'JSON|UUID|TIMESTAMP|DATE|TIME|DECIMAL',
                'value' => [
                    'arrayValue' => [
                        'arrayValues' => [
                            [...], // RECURSIVE
                            // ...
                        ],
                        'booleanValues' => [true || false, ...],
                        'doubleValues' => [<float>, ...],
                        'longValues' => [<integer>, ...],
                        'stringValues' => ['<string>', ...],
                    ],
                    'blobValue' => <string || resource || Psr\Http\Message\StreamInterface>,
                    'booleanValue' => true || false,
                    'doubleValue' => <float>,
                    'isNull' => true || false,
                    'longValue' => <integer>,
                    'stringValue' => '<string>',
                ],
            ],
            // ...
        ],
        // ...
    ],
    'resourceArn' => '<string>', // REQUIRED
    'schema' => '<string>',
    'secretArn' => '<string>', // REQUIRED
    'sql' => '<string>', // REQUIRED
    'transactionId' => '<string>',
]);

Parameter Details

Members
database
Type: string

The name of the database.

parameterSets
Type: Array of SqlParameter structuress

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.

Array parameters are not supported.

resourceArn
Required: Yes
Type: string

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

schema
Type: string

The name of the database schema.

Currently, the schema parameter isn't supported.

secretArn
Required: Yes
Type: string

The ARN of the secret that enables access to the DB cluster. Enter the database user name and password for the credentials in the secret.

For information about creating the secret, see Create a database secret.

sql
Required: Yes
Type: string

The SQL statement to run. Don't include a semicolon (;) at the end of the SQL statement.

transactionId
Type: 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.

Result Syntax

[
    'updateResults' => [
        [
            'generatedFields' => [
                [
                    'arrayValue' => [
                        'arrayValues' => [
                            [...], // RECURSIVE
                            // ...
                        ],
                        'booleanValues' => [true || false, ...],
                        'doubleValues' => [<float>, ...],
                        'longValues' => [<integer>, ...],
                        'stringValues' => ['<string>', ...],
                    ],
                    'blobValue' => <string || resource || Psr\Http\Message\StreamInterface>,
                    'booleanValue' => true || false,
                    'doubleValue' => <float>,
                    'isNull' => true || false,
                    'longValue' => <integer>,
                    'stringValue' => '<string>',
                ],
                // ...
            ],
        ],
        // ...
    ],
]

Result Details

Members
updateResults
Type: Array of UpdateResult structures

The execution results of each batch entry.

Errors

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.

ServiceUnavailableError:

The service specified by the resourceArn parameter 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.

BeginTransaction

$result = $client->beginTransaction([/* ... */]);
$promise = $client->beginTransactionAsync([/* ... */]);

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.

For Aurora MySQL, DDL statements inside a transaction cause an implicit commit. We recommend that you run each MySQL DDL statement in a separate ExecuteStatement call with continueAfterTimeout enabled.

Parameter Syntax

$result = $client->beginTransaction([
    'database' => '<string>',
    'resourceArn' => '<string>', // REQUIRED
    'schema' => '<string>',
    'secretArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
database
Type: string

The name of the database.

resourceArn
Required: Yes
Type: string

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

schema
Type: string

The name of the database schema.

secretArn
Required: Yes
Type: string

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

Result Syntax

[
    'transactionId' => '<string>',
]

Result Details

Members
transactionId
Type: string

The transaction ID of the transaction started by the call.

Errors

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.

ServiceUnavailableError:

The service specified by the resourceArn parameter 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.

CommitTransaction

$result = $client->commitTransaction([/* ... */]);
$promise = $client->commitTransactionAsync([/* ... */]);

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

Parameter Syntax

$result = $client->commitTransaction([
    'resourceArn' => '<string>', // REQUIRED
    'secretArn' => '<string>', // REQUIRED
    'transactionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

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

secretArn
Required: Yes
Type: string

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

transactionId
Required: Yes
Type: string

The identifier of the transaction to end and commit.

Result Syntax

[
    'transactionStatus' => '<string>',
]

Result Details

Members
transactionStatus
Type: string

The status of the commit operation.

Errors

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.

ServiceUnavailableError:

The service specified by the resourceArn parameter 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:

The resourceArn, secretArn, or transactionId value can't be found.

ExecuteSql

$result = $client->executeSql([/* ... */]);
$promise = $client->executeSqlAsync([/* ... */]);

Runs one or more SQL statements.

This operation isn't supported for Aurora Serverless v2 and provisioned DB clusters. For Aurora Serverless v1 DB clusters, the operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation.

Parameter Syntax

$result = $client->executeSql([
    'awsSecretStoreArn' => '<string>', // REQUIRED
    'database' => '<string>',
    'dbClusterOrInstanceArn' => '<string>', // REQUIRED
    'schema' => '<string>',
    'sqlStatements' => '<string>', // REQUIRED
]);

Parameter Details

Members
awsSecretStoreArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the secret that enables access to the DB cluster. Enter the database user name and password for the credentials in the secret.

For information about creating the secret, see Create a database secret.

database
Type: string

The name of the database.

dbClusterOrInstanceArn
Required: Yes
Type: string

The ARN of the Aurora Serverless DB cluster.

schema
Type: string

The name of the database schema.

sqlStatements
Required: Yes
Type: 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.

Result Syntax

[
    'sqlStatementResults' => [
        [
            'numberOfRecordsUpdated' => <integer>,
            'resultFrame' => [
                'records' => [
                    [
                        'values' => [
                            [
                                'arrayValues' => [
                                    [...], // RECURSIVE
                                    // ...
                                ],
                                'bigIntValue' => <integer>,
                                'bitValue' => true || false,
                                'blobValue' => <string || resource || Psr\Http\Message\StreamInterface>,
                                'doubleValue' => <float>,
                                'intValue' => <integer>,
                                'isNull' => true || false,
                                'realValue' => <float>,
                                'stringValue' => '<string>',
                                'structValue' => [
                                    'attributes' => [
                                        [...], // RECURSIVE
                                        // ...
                                    ],
                                ],
                            ],
                            // ...
                        ],
                    ],
                    // ...
                ],
                'resultSetMetadata' => [
                    'columnCount' => <integer>,
                    'columnMetadata' => [
                        [
                            'arrayBaseColumnType' => <integer>,
                            'isAutoIncrement' => true || false,
                            'isCaseSensitive' => true || false,
                            'isCurrency' => true || false,
                            'isSigned' => true || false,
                            'label' => '<string>',
                            'name' => '<string>',
                            'nullable' => <integer>,
                            'precision' => <integer>,
                            'scale' => <integer>,
                            'schemaName' => '<string>',
                            'tableName' => '<string>',
                            'type' => <integer>,
                            'typeName' => '<string>',
                        ],
                        // ...
                    ],
                ],
            ],
        ],
        // ...
    ],
]

Result Details

Members
sqlStatementResults
Type: Array of SqlStatementResult structures

The results of the SQL statement or statements.

Errors

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.

ServiceUnavailableError:

The service specified by the resourceArn parameter isn't available.

ExecuteStatement

$result = $client->executeStatement([/* ... */]);
$promise = $client->executeStatementAsync([/* ... */]);

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.

If the binary response data from the database is more than 1 MB, the call is terminated.

Parameter Syntax

$result = $client->executeStatement([
    'continueAfterTimeout' => true || false,
    'database' => '<string>',
    'formatRecordsAs' => 'NONE|JSON',
    'includeResultMetadata' => true || false,
    'parameters' => [
        [
            'name' => '<string>',
            'typeHint' => 'JSON|UUID|TIMESTAMP|DATE|TIME|DECIMAL',
            'value' => [
                'arrayValue' => [
                    'arrayValues' => [
                        [...], // RECURSIVE
                        // ...
                    ],
                    'booleanValues' => [true || false, ...],
                    'doubleValues' => [<float>, ...],
                    'longValues' => [<integer>, ...],
                    'stringValues' => ['<string>', ...],
                ],
                'blobValue' => <string || resource || Psr\Http\Message\StreamInterface>,
                'booleanValue' => true || false,
                'doubleValue' => <float>,
                'isNull' => true || false,
                'longValue' => <integer>,
                'stringValue' => '<string>',
            ],
        ],
        // ...
    ],
    'resourceArn' => '<string>', // REQUIRED
    'resultSetOptions' => [
        'decimalReturnType' => 'STRING|DOUBLE_OR_LONG',
        'longReturnType' => 'STRING|LONG',
    ],
    'schema' => '<string>',
    'secretArn' => '<string>', // REQUIRED
    'sql' => '<string>', // REQUIRED
    'transactionId' => '<string>',
]);

Parameter Details

Members
continueAfterTimeout
Type: 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
Type: string

The name of the database.

formatRecordsAs
Type: string

A value that indicates whether to format the result set as a single JSON string. This parameter only applies to SELECT statements and is ignored for other types of statements. Allowed values are NONE and JSON. The default value is NONE. The result is returned in the formattedRecords field.

For usage information about the JSON format for result sets, see Using the Data API in the Amazon Aurora User Guide.

includeResultMetadata
Type: boolean

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

parameters
Type: Array of SqlParameter structures

The parameters for the SQL statement.

Array parameters are not supported.

resourceArn
Required: Yes
Type: string

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

resultSetOptions
Type: ResultSetOptions structure

Options that control how the result set is returned.

schema
Type: string

The name of the database schema.

Currently, the schema parameter isn't supported.

secretArn
Required: Yes
Type: string

The ARN of the secret that enables access to the DB cluster. Enter the database user name and password for the credentials in the secret.

For information about creating the secret, see Create a database secret.

sql
Required: Yes
Type: string

The SQL statement to run.

transactionId
Type: 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.

Result Syntax

[
    'columnMetadata' => [
        [
            'arrayBaseColumnType' => <integer>,
            'isAutoIncrement' => true || false,
            'isCaseSensitive' => true || false,
            'isCurrency' => true || false,
            'isSigned' => true || false,
            'label' => '<string>',
            'name' => '<string>',
            'nullable' => <integer>,
            'precision' => <integer>,
            'scale' => <integer>,
            'schemaName' => '<string>',
            'tableName' => '<string>',
            'type' => <integer>,
            'typeName' => '<string>',
        ],
        // ...
    ],
    'formattedRecords' => '<string>',
    'generatedFields' => [
        [
            'arrayValue' => [
                'arrayValues' => [
                    [...], // RECURSIVE
                    // ...
                ],
                'booleanValues' => [true || false, ...],
                'doubleValues' => [<float>, ...],
                'longValues' => [<integer>, ...],
                'stringValues' => ['<string>', ...],
            ],
            'blobValue' => <string || resource || Psr\Http\Message\StreamInterface>,
            'booleanValue' => true || false,
            'doubleValue' => <float>,
            'isNull' => true || false,
            'longValue' => <integer>,
            'stringValue' => '<string>',
        ],
        // ...
    ],
    'numberOfRecordsUpdated' => <integer>,
    'records' => [
        [
            [
                'arrayValue' => [
                    'arrayValues' => [
                        [...], // RECURSIVE
                        // ...
                    ],
                    'booleanValues' => [true || false, ...],
                    'doubleValues' => [<float>, ...],
                    'longValues' => [<integer>, ...],
                    'stringValues' => ['<string>', ...],
                ],
                'blobValue' => <string || resource || Psr\Http\Message\StreamInterface>,
                'booleanValue' => true || false,
                'doubleValue' => <float>,
                'isNull' => true || false,
                'longValue' => <integer>,
                'stringValue' => '<string>',
            ],
            // ...
        ],
        // ...
    ],
]

Result Details

Members
columnMetadata
Type: Array of ColumnMetadata structures

Metadata for the columns included in the results. This field is blank if the formatRecordsAs parameter is set to JSON.

formattedRecords
Type: string

A string value that represents the result set of a SELECT statement in JSON format. This value is only present when the formatRecordsAs parameter is set to JSON.

The size limit for this field is currently 10 MB. If the JSON-formatted string representing the result set requires more than 10 MB, the call returns an error.

generatedFields
Type: Array of Field structures

Values for fields generated during a DML request.

The generatedFields data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the RETURNING clause. For more information, see Returning Data From Modified Rows in the PostgreSQL documentation.

numberOfRecordsUpdated
Type: long (int|float)

The number of records updated by the request.

records
Type: Array of Field structuress

The records returned by the SQL statement. This field is blank if the formatRecordsAs parameter is set to JSON.

Errors

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.

ServiceUnavailableError:

The service specified by the resourceArn parameter 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.

RollbackTransaction

$result = $client->rollbackTransaction([/* ... */]);
$promise = $client->rollbackTransactionAsync([/* ... */]);

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

Parameter Syntax

$result = $client->rollbackTransaction([
    'resourceArn' => '<string>', // REQUIRED
    'secretArn' => '<string>', // REQUIRED
    'transactionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

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

secretArn
Required: Yes
Type: string

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

transactionId
Required: Yes
Type: string

The identifier of the transaction to roll back.

Result Syntax

[
    'transactionStatus' => '<string>',
]

Result Details

Members
transactionStatus
Type: string

The status of the rollback operation.

Errors

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.

ServiceUnavailableError:

The service specified by the resourceArn parameter 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:

The resourceArn, secretArn, or transactionId value can't be found.

Shapes

AccessDeniedException

Description

You don't have sufficient access to perform this action.

Members
message
Type: string

ArrayValue

Description

Contains an array.

Members
arrayValues
Type: Array of ArrayValue structures

An array of arrays.

booleanValues
Type: Array of booleans

An array of Boolean values.

doubleValues
Type: Array of doubles

An array of floating-point numbers.

longValues
Type: Array of long (int|float)s

An array of integers.

stringValues
Type: Array of strings

An array of strings.

BadRequestException

Description

There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.)

Members
message
Type: string

The error message returned by this BadRequestException error.

ColumnMetadata

Description

Contains the metadata for a column.

Members
arrayBaseColumnType
Type: int

The type of the column.

isAutoIncrement
Type: boolean

A value that indicates whether the column increments automatically.

isCaseSensitive
Type: boolean

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

isCurrency
Type: boolean

A value that indicates whether the column contains currency values.

isSigned
Type: boolean

A value that indicates whether an integer column is signed.

label
Type: string

The label for the column.

name
Type: string

The name of the column.

nullable
Type: int

A value that indicates whether the column is nullable.

precision
Type: int

The precision value of a decimal number column.

scale
Type: int

The scale value of a decimal number column.

schemaName
Type: string

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

tableName
Type: string

The name of the table that includes the column.

type
Type: int

The type of the column.

typeName
Type: string

The database-specific data type of the column.

DatabaseErrorException

Description

There was an error in processing the SQL statement.

Members
message
Type: string

DatabaseNotFoundException

Description

The DB cluster doesn't have a DB instance.

Members
message
Type: string

DatabaseUnavailableException

Description

The writer instance in the DB cluster isn't available.

Members

Field

Description

Contains a value.

Members
arrayValue
Type: ArrayValue structure

An array of values.

blobValue
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

A value of BLOB data type.

booleanValue
Type: boolean

A value of Boolean data type.

doubleValue
Type: double

A value of double data type.

isNull
Type: boolean

A NULL value.

longValue
Type: long (int|float)

A value of long data type.

stringValue
Type: string

A value of string data type.

ForbiddenException

Description

There are insufficient privileges to make the call.

Members
message
Type: string

The error message returned by this ForbiddenException error.

HttpEndpointNotEnabledException

Description

The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster.

Members
message
Type: string

InternalServerErrorException

Description

An internal error occurred.

Members

InvalidSecretException

Description

The Secrets Manager secret used with the request isn't valid.

Members
message
Type: string

NotFoundException

Description

The resourceArn, secretArn, or transactionId value can't be found.

Members
message
Type: string

The error message returned by this NotFoundException error.

Record

Description

A record returned by a call.

This data structure is only used with the deprecated ExecuteSql operation. Use the BatchExecuteStatement or ExecuteStatement operation instead.

Members
values
Type: Array of Value structures

The values returned in the record.

ResultFrame

Description

The result set returned by a SQL statement.

This data structure is only used with the deprecated ExecuteSql operation. Use the BatchExecuteStatement or ExecuteStatement operation instead.

Members
records
Type: Array of Record structures

The records in the result set.

resultSetMetadata
Type: ResultSetMetadata structure

The result-set metadata in the result set.

ResultSetMetadata

Description

The metadata of the result set returned by a SQL statement.

Members
columnCount
Type: long (int|float)

The number of columns in the result set.

columnMetadata
Type: Array of ColumnMetadata structures

The metadata of the columns in the result set.

ResultSetOptions

Description

Options that control how the result set is returned.

Members
decimalReturnType
Type: 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.

longReturnType
Type: string

A value that indicates how a field of LONG type is represented. Allowed values are LONG and STRING. The default is LONG. Specify STRING if the length or precision of numeric values might cause truncation or rounding errors.

SecretsErrorException

Description

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.

Members
message
Type: string

ServiceUnavailableError

Description

The service specified by the resourceArn parameter isn't available.

Members

SqlParameter

Description

A parameter used in a SQL statement.

Members
name
Type: string

The name of the parameter.

typeHint
Type: 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.

value
Type: Field structure

The value of the parameter.

SqlStatementResult

Description

The result of a SQL statement.

This data structure is only used with the deprecated ExecuteSql operation. Use the BatchExecuteStatement or ExecuteStatement operation instead.

Members
numberOfRecordsUpdated
Type: long (int|float)

The number of records updated by a SQL statement.

resultFrame
Type: ResultFrame structure

The result set of the SQL statement.

StatementTimeoutException

Description

The execution of the SQL statement timed out.

Members
dbConnectionId
Type: long (int|float)

The database connection ID that executed the SQL statement.

message
Type: string

The error message returned by this StatementTimeoutException error.

StructValue

Description

A structure value returned by a call.

This data structure is only used with the deprecated ExecuteSql operation. Use the BatchExecuteStatement or ExecuteStatement operation instead.

Members
attributes
Type: Array of Value structures

The attributes returned in the record.

TransactionNotFoundException

Description

The transaction ID wasn't found.

Members
message
Type: string

UnsupportedResultException

Description

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.

Members
message
Type: string

UpdateResult

Description

The response elements represent the results of an update.

Members
generatedFields
Type: Array of Field structures

Values for fields generated during the request.

Value

Description

Contains the value of a column.

This data structure is only used with the deprecated ExecuteSql operation. Use the BatchExecuteStatement or ExecuteStatement operation instead.

Members
arrayValues
Type: Array of Value structures

An array of column values.

bigIntValue
Type: long (int|float)

A value for a column of big integer data type.

bitValue
Type: boolean

A value for a column of BIT data type.

blobValue
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

A value for a column of BLOB data type.

doubleValue
Type: double

A value for a column of double data type.

intValue
Type: int

A value for a column of integer data type.

isNull
Type: boolean

A NULL value.

realValue
Type: float

A value for a column of real data type.

stringValue
Type: string

A value for a column of string data type.

structValue
Type: StructValue structure

A value for a column of STRUCT data type.