Jump to Content

Class ExecuteStatementCommandProtected

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.

Example

Use a bare-bones client and the command you need to make an API call.

import { RDSDataClient, ExecuteStatementCommand } from "@aws-sdk/client-rds-data"; // ES Modules import
// const { RDSDataClient, ExecuteStatementCommand } = require("@aws-sdk/client-rds-data"); // CommonJS import
const client = new RDSDataClient(config);
const command = new ExecuteStatementCommand(input);
const response = await client.send(command);

Param

ExecuteStatementCommandInput

Returns

ExecuteStatementCommandOutput

See

Throws

AccessDeniedException (client fault)

You do not have sufficient access to perform this action.

Throws

BadRequestException (client fault)

There is an error in the call or in a SQL statement.

Throws

ForbiddenException (client fault)

There are insufficient privileges to make the call.

Throws

InternalServerErrorException (server fault)

An internal error occurred.

Throws

ServiceUnavailableError (server fault)

The service specified by the resourceArn parameter is not available.

Throws

StatementTimeoutException (client fault)

The execution of the SQL statement timed out.

Hierarchy

Constructors

Properties

Methods