execute_sql
¶
execute_sql(
db_cluster_or_instance_arn: Arn,
aws_secret_store_arn: Arn,
sql_statements: SqlStatement,
*,
config_overrides: Optional[RDSDataClientConfig] = None,
database: Optional[DbName] = None,
schema: Optional[DbName] = None,
) -> ExecuteSqlResponse
Runs one or more SQL statements.
This operation is deprecated. Please use the BatchExecuteStatement or ExecuteStatement operation.
Parameters:
-
db_cluster_or_instance_arn(Arn) –The ARN of the Aurora Serverless DB cluster.
-
aws_secret_store_arn(Arn) –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.
-
sql_statements(SqlStatement) –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.
-
database(Optional[DbName], default:None) –The name of the database.
-
schema(Optional[DbName], default:None) –The name of the database schema.
Raises:
-
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 exception is deprecated.
-
ForbiddenException–There are insufficient privileges to make the call.
-
InternalServerErrorException–An internal error occurred.
-
ServiceUnavailableError–The service specified by the
resourceArnparameter isn't available. -
UnknownServiceError–The service returned an error code this client does not model.