AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

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.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to ExecuteSqlAsync.

Namespace: Amazon.RDSDataService
Assembly: AWSSDK.RDSDataService.dll
Version: 3.x.y.z

Syntax

C#
public virtual ExecuteSqlResponse ExecuteSql(
         ExecuteSqlRequest request
)

Parameters

request
Type: Amazon.RDSDataService.Model.ExecuteSqlRequest

Container for the necessary parameters to execute the ExecuteSql service method.

Return Value


The response from the ExecuteSql service method, as returned by RDSDataService.

Exceptions

ExceptionCondition
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.)
ForbiddenException There are insufficient privileges to make the call.
InternalServerErrorException An internal error occurred.
ServiceUnavailableErrorException The service specified by the resourceArn parameter isn't available.

Version Information

.NET Framework:
Supported in: 4.5 and newer, 3.5

See Also