### BeginTransaction Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_BeginTransaction.md Starts a SQL transaction. A transaction can run for a maximum of 24 hours and times out if no calls use its transaction ID in three minutes. ```APIDOC ## POST /BeginTransaction ### Description Starts a SQL transaction. ### Method POST ### Endpoint /BeginTransaction ### Request Body - **database** (string) - Optional - The name of the database. Length Constraints: Minimum length of 0. Maximum length of 64. - **resourceArn** (string) - Required - The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster. Length Constraints: Minimum length of 11. Maximum length of 100. - **schema** (string) - Optional - The name of the database schema. Length Constraints: Minimum length of 0. Maximum length of 64. - **secretArn** (string) - Required - The name or ARN of the secret that enables access to the DB cluster. Length Constraints: Minimum length of 11. Maximum length of 100. ### Request Example { "database": "{{string}}", "resourceArn": "{{string}}", "schema": "{{string}}", "secretArn": "{{string}}" } ### Response #### Success Response (200) - **transactionId** (string) - The transaction ID of the transaction started by the call. Length Constraints: Minimum length of 0. Maximum length of 192. #### Response Example { "transactionId": "string" } ``` -------------------------------- ### BeginTransaction Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_Operations.md Begins a new database transaction. ```APIDOC ## BeginTransaction ### Description Starts a new transaction, allowing for a series of operations to be treated as a single unit. ### Method POST ### Endpoint /BeginTransaction ### Parameters #### Request Body - **DatabaseName** (string) - Optional - The name of the database to start the transaction in. ### Response #### Success Response (200) - **TransactionId** (string) - The ID of the newly created transaction. #### Response Example ```json { "TransactionId": "txn_12345abcde" } ``` ``` -------------------------------- ### BatchExecuteStatement API Documentation Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_BatchExecuteStatement.md Provides details on the response elements and errors for the BatchExecuteStatement API. ```APIDOC ## BatchExecuteStatement API ### Description Executes a batch of SQL statements. ### Method POST ### Endpoint /BatchExecuteStatement ### Response #### Success Response (200) - **updateResults** (Array of UpdateResult objects) - The execution results of each batch entry. #### Response Example ```json { "updateResults": [ { "generatedFields": [], "numberOfRecordsUpdated": 0 } ] } ``` ### Errors - **AccessDeniedException** - You don't have sufficient access to perform this action. (HTTP Status Code: 403) - **BadRequestException** - There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) - **message** - The error message returned by this `BadRequestException` error. (HTTP Status Code: 400) - **DatabaseErrorException** - There was an error in processing the SQL statement. (HTTP Status Code: 400) - **DatabaseNotFoundException** - The DB cluster doesn't have a DB instance. (HTTP Status Code: 404) - **DatabaseResumingException** - A request was cancelled because the Aurora Serverless v2 DB instance was paused. The Data API request automatically resumes the DB instance. Wait a few seconds and try again. (HTTP Status Code: 400) - **DatabaseUnavailableException** - The writer instance in the DB cluster isn't available. (HTTP Status Code: 504) - **ForbiddenException** - There are insufficient privileges to make the call. - **message** - The error message returned by this `ForbiddenException` error. (HTTP Status Code: 403) - **HttpEndpointNotEnabledException** - The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. (HTTP Status Code: 400) - **InternalServerErrorException** - An internal error occurred. (HTTP Status Code: 500) - **InvalidResourceStateException** - The resource is in an invalid state. (HTTP Status Code: 400) - **InvalidSecretException** - The Secrets Manager secret used with the request isn't valid. (HTTP Status Code: 400) - **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. (HTTP Status Code: 400) - **ServiceUnavailableError** - The service specified by the `resourceArn` parameter isn't available. (HTTP Status Code: 503) - **StatementTimeoutException** - The execution of the SQL statement timed out. - **dbConnectionId** - The database connection ID that executed the SQL statement. - **message** - The error message returned by this `StatementTimeoutException` error. (HTTP Status Code: 400) - **TransactionNotFoundException** - The transaction ID wasn't found. (HTTP Status Code: 404) ``` -------------------------------- ### BeginTransaction Request Syntax Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_BeginTransaction.md This snippet shows the structure of a POST request to the BeginTransaction API endpoint, including the required JSON body parameters. ```json POST /BeginTransaction HTTP/1.1 Content-type: application/json { "database": "{{string}}", "resourceArn": "{{string}}", "schema": "{{string}}", "secretArn": "{{string}}" } ``` -------------------------------- ### BatchExecuteStatement API Reference Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_BatchExecuteStatement.md This section details the BatchExecuteStatement API, including its request syntax, parameters, and response structure. It's used for running batch SQL statements over an array of data. ```APIDOC ## POST /BatchExecute ### Description Runs a batch SQL statement over an array of data. This is useful for bulk update and insert operations. ### Method POST ### Endpoint /BatchExecute ### Parameters #### Request Body - **database** (string) - Optional - The name of the database. Length: 0-64. - **parameterSets** (Array of arrays of SqlParameter objects) - Optional - The parameter set for the batch operation. The SQL statement is executed as many times as the number of parameter sets provided. Array parameters are not supported. - **resourceArn** (string) - Required - The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster. Length: 11-100. - **schema** (string) - Optional - The name of the database schema. Currently not supported. Length: 0-64. - **secretArn** (string) - Required - The ARN of the secret that enables access to the DB cluster. Length: 11-100. - **sql** (string) - Required - The SQL statement to run. Don't include a semicolon (;) at the end. Length: 0-65536. - **transactionId** (string) - Optional - The identifier of a transaction started by using the BeginTransaction operation. Length: 0-192. ### Request Example ```json { "database": "{{string}}", "parameterSets": [ [ { "name": "{{string}}", "typeHint": "{{string}}", "value": { ... } } ] ], "resourceArn": "{{string}}", "schema": "{{string}}", "secretArn": "{{string}}", "sql": "{{string}}", "transactionId": "{{string}}" } ``` ### Response #### Success Response (200) - **updateResults** (Array of objects) - Contains the results of the batch update operations. - **generatedFields** (Array of objects) - Contains the generated fields, if any. ``` -------------------------------- ### BatchExecuteStatement Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_Operations.md Executes a batch of SQL statements. ```APIDOC ## BatchExecuteStatement ### Description Executes a batch of SQL statements against the database. ### Method POST ### Endpoint /BatchExecuteStatement ### Parameters #### Request Body - **Statements** (array) - Required - An array of SQL statements to execute. - **DatabaseName** (string) - Optional - The name of the database to execute the statements against. ### Response #### Success Response (200) - **ExecutionResults** (array) - An array of results for each executed statement. #### Response Example ```json { "ExecutionResults": [ { "Table nào": "result1" }, { "Table nào": "result2" } ] } ``` ``` -------------------------------- ### ExecuteSql Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_Operations.md Executes a single SQL statement. ```APIDOC ## ExecuteSql ### Description Executes a single SQL statement against the database. ### Method POST ### Endpoint /ExecuteSql ### Parameters #### Request Body - **SqlStatement** (string) - Required - The SQL statement to execute. - **DatabaseName** (string) - Optional - The name of the database to execute the statement against. ### Response #### Success Response (200) - **ExecutionResult** (object) - The result of the SQL statement execution. #### Response Example ```json { "ExecutionResult": { "Table nào": "result" } } ``` ``` -------------------------------- ### ExecuteStatement Request Syntax Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ExecuteStatement.md This snippet shows the structure of a POST request to the ExecuteStatement API endpoint. It includes common parameters like resource ARN, SQL statement, database credentials, and transaction ID. ```http POST /Execute HTTP/1.1 Content-type: application/json { "continueAfterTimeout": {{boolean}}, "database": "{{string}}", "formatRecordsAs": "{{string}}", "includeResultMetadata": {{boolean}}, "parameters": [ { "name": "{{string}}", "typeHint": "{{string}}", "value": { ... } } ], "resourceArn": "{{string}}", "resultSetOptions": { "decimalReturnType": "{{string}}", "longReturnType": "{{string}}" }, "schema": "{{string}}", "secretArn": "{{string}}", "sql": "{{string}}", "transactionId": "{{string}}" } ``` -------------------------------- ### BeginTransaction Response Syntax Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_BeginTransaction.md This snippet illustrates the expected JSON response format when the BeginTransaction API call is successful, returning a transaction ID. ```json HTTP/1.1 200 Content-type: application/json { "transactionId": "string" } ``` -------------------------------- ### SqlParameter Object Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_SqlParameter.md Defines a parameter for a SQL statement, specifying its name, type hint, and value. ```APIDOC ## SqlParameter ### Description A parameter used in a SQL statement. ### Fields - **name** (String) - Optional - The name of the parameter. - **typeHint** (String) - Optional - A hint that specifies the correct object type for data type mapping. Valid Values: `JSON | UUID | TIMESTAMP | DATE | TIME | DECIMAL`. - `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** (Field object) - Optional - The value of the parameter. This object is a Union; only one member can be specified or returned. ``` -------------------------------- ### ExecuteSql API Request Syntax Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ExecuteSql.md This is the basic JSON structure for an ExecuteSql API request. It includes parameters for authentication, database identification, and the SQL statements to be executed. ```json { "awsSecretStoreArn": "{{string}}", "database": "{{string}}", "dbClusterOrInstanceArn": "{{string}}", "schema": "{{string}}", "sqlStatements": "{{string}}" } ``` -------------------------------- ### BeginTransaction API Errors Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_BeginTransaction.md This section lists the possible errors that can be returned by the BeginTransaction API operation. ```APIDOC ## Errors **AccessDeniedException** You don't have sufficient access to perform this action. HTTP Status Code: 403 **BadRequestException** There is an error in the call or in a SQL statement. (This error only appears in calls from Aurora Serverless v1 databases.) **message** The error message returned by this `BadRequestException` error. HTTP Status Code: 400 **DatabaseErrorException** There was an error in processing the SQL statement. HTTP Status Code: 400 **DatabaseNotFoundException** The DB cluster doesn't have a DB instance. HTTP Status Code: 404 **DatabaseResumingException** A request was cancelled because the Aurora Serverless v2 DB instance was paused. The Data API request automatically resumes the DB instance. Wait a few seconds and try again. HTTP Status Code: 400 **DatabaseUnavailableException** The writer instance in the DB cluster isn't available. HTTP Status Code: 504 **ForbiddenException** There are insufficient privileges to make the call. **message** The error message returned by this `ForbiddenException` error. HTTP Status Code: 403 **HttpEndpointNotEnabledException** The HTTP endpoint for using RDS Data API isn't enabled for the DB cluster. HTTP Status Code: 400 **InternalServerErrorException** An internal error occurred. HTTP Status Code: 500 **InvalidResourceStateException** The resource is in an invalid state. HTTP Status Code: 400 **InvalidSecretException** The Secrets Manager secret used with the request isn't valid. HTTP Status Code: 400 **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. HTTP Status Code: 400 **ServiceUnavailableError** The service specified by the `resourceArn` parameter isn't available. HTTP Status Code: 503 **StatementTimeoutException** The execution of the SQL statement timed out. **dbConnectionId** The database connection ID that executed the SQL statement. **message** The error message returned by this `StatementTimeoutException` error. HTTP Status Code: 400 **TransactionNotFoundException** The transaction ID wasn't found. HTTP Status Code: 404 ``` -------------------------------- ### BatchExecuteStatement Request Syntax Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_BatchExecuteStatement.md This is the standard JSON request body structure for the BatchExecuteStatement API. It includes parameters like database, resource ARN, secret ARN, SQL statement, and optional transaction ID. ```json { "database": "{{string}}", "parameterSets": [ [ { "name": "{{string}}", "typeHint": "{{string}}", "value": { ... } } ] ], "resourceArn": "{{string}}", "schema": "{{string}}", "secretArn": "{{string}}", "sql": "{{string}}", "transactionId": "{{string}}" } ``` -------------------------------- ### ExecuteStatement API Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ExecuteStatement.md This snippet details the ExecuteStatement API endpoint for running SQL statements. ```APIDOC ## POST /Execute ### Description Runs a SQL statement against a database. If a call isn't part of a transaction, changes are committed automatically. Binary response data exceeding 1 MB will terminate the call. ### Method POST ### Endpoint /Execute ### Request Body - **continueAfterTimeout** (boolean) - Optional - **database** (string) - Required - **formatRecordsAs** (string) - Optional - **includeResultMetadata** (boolean) - Optional - **parameters** (array) - Optional - **name** (string) - Required - **typeHint** (string) - Optional - **value** (any) - Required - **resourceArn** (string) - Required - **resultSetOptions** (object) - Optional - **decimalReturnType** (string) - Optional - **longReturnType** (string) - Optional - **schema** (string) - Optional - **secretArn** (string) - Required - **sql** (string) - Required - **transactionId** (string) - Optional ### Request Example ```json { "continueAfterTimeout": true, "database": "example_db", "formatRecordsAs": "JSON", "includeResultMetadata": true, "parameters": [ { "name": "param1", "typeHint": "VARCHAR", "value": { "stringValue": "example_value" } } ], "resourceArn": "arn:aws:rds:us-east-1:123456789012:cluster:my-cluster", "resultSetOptions": { "decimalReturnType": "DOUBLE", "longReturnType": "LONG" }, "schema": "public", "secretArn": "arn:aws:secretsmanager:us-east-1:123456789012:secret:my-secret", "sql": "SELECT * FROM my_table WHERE column1 = :param1", "transactionId": "transaction-123" } ``` ### Response #### Success Response (200) (Response structure not detailed in source) ``` -------------------------------- ### Performance Insights API Reference Source: https://docs.aws.amazon.com/rds/index.html Describes all the API operations for Performance Insights in detail. Provides all syntax. Also provides sample requests, responses, and errors for the supported web service protocols. ```APIDOC ## Performance Insights API Reference ### Description Describes all the API operations for Performance Insights in detail. Provides all syntax. Also provides sample requests, responses, and errors for the supported web service protocols. ### Method [HTTP method: GET, POST, PUT, DELETE, etc.] ### Endpoint [Full endpoint path with any path parameters] ### Parameters #### Path Parameters - **param1** (type) - Required/Optional - Description #### Query Parameters - **param1** (type) - Required/Optional - Description #### Request Body - **field1** (type) - Required/Optional - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### BatchExecuteStatement Response Syntax Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_BatchExecuteStatement.md This is the JSON response structure for the BatchExecuteStatement API. It contains update results, including any generated fields from the executed SQL statements. ```json { "updateResults": [ { "generatedFields": [ { ... } ] } ] } ``` -------------------------------- ### RDS Data API Reference Source: https://docs.aws.amazon.com/rds/index.html Describes all operations for RDS Data API in detail. Provides all sample requests, responses, and errors for the supported web service protocols. ```APIDOC ## RDS Data API Reference ### Description Describes all operations for RDS Data API in detail. Provides all sample requests, responses, and errors for the supported web service protocols. ### Method [HTTP method: GET, POST, PUT, DELETE, etc.] ### Endpoint [Full endpoint path with any path parameters] ### Parameters #### Path Parameters - **param1** (type) - Required/Optional - Description #### Query Parameters - **param1** (type) - Required/Optional - Description #### Request Body - **field1** (type) - Required/Optional - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### RollbackTransaction Response Syntax Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_RollbackTransaction.md This is the expected HTTP 200 response syntax for a successful RollbackTransaction operation. It returns the transaction status. ```http HTTP/1.1 200 Content-type: application/json { "transactionStatus": "string" } ``` -------------------------------- ### Value Data Structure Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_Value.md Details of the members within the Value data structure, including their types and whether they are required. ```APIDOC ## Value Data Structure Contains the value of a column. **Note** This data structure is only used with the deprecated `ExecuteSql` operation. Use the `BatchExecuteStatement` or `ExecuteStatement` operation instead. This data type is a UNION, so only one of the following members can be specified when used or returned. ### Members - **arrayValues** (Array of [Value](#API_Value) objects) - Optional - An array of column values. - **bigIntValue** (Long) - Optional - A value for a column of big integer data type. - **bitValue** (Boolean) - Optional - A value for a column of BIT data type. - **blobValue** (Base64-encoded binary data object) - Optional - A value for a column of BLOB data type. - **doubleValue** (Double) - Optional - A value for a column of double data type. - **intValue** (Integer) - Optional - A value for a column of integer data type. - **isNull** (Boolean) - Optional - A NULL value. - **realValue** (Float) - Optional - A value for a column of real data type. - **stringValue** (String) - Optional - A value for a column of string data type. - **structValue** ( [StructValue](API_StructValue.md) object) - Optional - A value for a column of STRUCT data type. ``` -------------------------------- ### ExecuteStatement API Request Body Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ExecuteStatement.md Details the parameters that can be included in the request body for the ExecuteStatement API operation. ```APIDOC ## ExecuteStatement API Request Body The request accepts the following data in JSON format. ### Parameters #### Request Body Parameters - **continueAfterTimeout** (Boolean) - Optional - 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) - Optional - The name of the database. Length Constraints: Minimum length of 0. Maximum length of 64. - **formatRecordsAs** (String) - Optional - 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. - **includeResultMetadata** (Boolean) - Optional - A value that indicates whether to include metadata in the results. - **parameters** (Array of [SqlParameter](API_SqlParameter.md) objects) - Optional - The parameters for the SQL statement. Array parameters are not supported. - **resourceArn** (String) - Required - The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster. Length Constraints: Minimum length of 11. Maximum length of 100. - **resultSetOptions** (Object) - Optional - Options that control how the result set is returned. Type: [ResultSetOptions](API_ResultSetOptions.md) object. - **schema** (String) - Optional - The name of the database schema. Currently, the `schema` parameter isn't supported. Length Constraints: Minimum length of 0. Maximum length of 64. - **secretArn** (String) - Required - 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. Length Constraints: Minimum length of 11. Maximum length of 100. - **sql** (String) - Required - The SQL statement to run. Length Constraints: Minimum length of 0. Maximum length of 65536. - **transactionId** (String) - Optional - 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. Length Constraints: Minimum length of 0. Maximum length of 192. ``` -------------------------------- ### ExecuteStatement Response Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ExecuteStatement.md Details the structure and elements of a successful response from the ExecuteStatement API. ```APIDOC ## ExecuteStatement Response ### Description This section details the structure and elements of a successful response from the ExecuteStatement API. It outlines the metadata, records, and updated counts returned by the service. ### Response Syntax ```json { "columnMetadata": [ { "arrayBaseColumnType": number, "isAutoIncrement": boolean, "isCaseSensitive": boolean, "isCurrency": boolean, "isSigned": boolean, "label": "string", "name": "string", "nullable": number, "precision": number, "scale": number, "schemaName": "string", "tableName": "string", "type": number, "typeName": "string" } ], "formattedRecords": "string", "generatedFields": [ { ... } ], "numberOfRecordsUpdated": number, "records": [ [ { ... } ] ] } ``` ### Response Elements **columnMetadata** (Array of ColumnMetadata objects) - Metadata for the columns included in the results. This field is blank if the `formatRecordsAs` parameter is set to `JSON`. **formattedRecords** (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. **generatedFields** (Array of Field objects) - Values for fields generated during a DML request. This data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the `RETURNING` clause. **numberOfRecordsUpdated** (Long) - The number of records updated by the request. **records** (Array of arrays of Field objects) - The records returned by the SQL statement. This field is blank if the `formatRecordsAs` parameter is set to `JSON`. ``` -------------------------------- ### ExecuteStatement API Response Syntax Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ExecuteStatement.md This JSON structure represents a successful response from the ExecuteStatement API, detailing the format of returned data. ```json HTTP/1.1 200 Content-type: application/json { "columnMetadata": [ { "arrayBaseColumnType": number, "isAutoIncrement": boolean, "isCaseSensitive": boolean, "isCurrency": boolean, "isSigned": boolean, "label": "string", "name": "string", "nullable": number, "precision": number, "scale": number, "schemaName": "string", "tableName": "string", "type": number, "typeName": "string" } ], "formattedRecords": "string", "generatedFields": [ { ... } ], "numberOfRecordsUpdated": number, "records": [ [ { ... } ] ] } ``` -------------------------------- ### Amazon RDS API Reference Source: https://docs.aws.amazon.com/rds/index.html Describes all the API operations for Amazon RDS in detail. Also provides sample requests, responses, and errors for the supported web services protocols. ```APIDOC ## Amazon RDS API Reference ### Description Describes all the API operations for Amazon RDS in detail. Also provides sample requests, responses, and errors for the supported web services protocols. ### Method [HTTP method: GET, POST, PUT, DELETE, etc.] ### Endpoint [Full endpoint path with any path parameters] ### Parameters #### Path Parameters - **param1** (type) - Required/Optional - Description #### Query Parameters - **param1** (type) - Required/Optional - Description #### Request Body - **field1** (type) - Required/Optional - Description ### Request Example { "example": "request body" } ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### RollbackTransaction Request Syntax Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_RollbackTransaction.md This is the standard POST request syntax for the RollbackTransaction API operation. It requires the resource ARN, secret ARN, and transaction ID in the JSON body. ```http POST /RollbackTransaction HTTP/1.1 Content-type: application/json { "resourceArn": "{{string}}", "secretArn": "{{string}}", "transactionId": "{{string}}" } ``` -------------------------------- ### ExecuteSql API Operation Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ExecuteSql.md This snippet details the ExecuteSql API operation, including its request syntax, parameters, and response structure. It is used to run SQL statements against an RDS database. ```APIDOC ## POST /ExecuteSql ### Description Runs one or more SQL statements against a specified database cluster or instance. This operation is not supported for Aurora Serverless v2 and provisioned DB clusters. For Aurora Serverless v1 DB clusters, the operation is deprecated. ### Method POST ### Endpoint /ExecuteSql ### Parameters #### Request Body - **awsSecretStoreArn** (string) - Required - The Amazon Resource Name (ARN) of the secret that enables access to the DB cluster. Minimum length: 11. Maximum length: 100. - **database** (string) - Optional - The name of the database. Minimum length: 0. Maximum length: 64. - **dbClusterOrInstanceArn** (string) - Required - The ARN of the Aurora Serverless DB cluster. Minimum length: 11. Maximum length: 100. - **schema** (string) - Optional - The name of the database schema. Minimum length: 0. Maximum length: 64. - **sqlStatements** (string) - Required - One or more SQL statements to run on the DB cluster. Statements can be separated by semicolons. Minimum length: 0. Maximum length: 65536. ### Request Example ```json { "awsSecretStoreArn": "{{string}}", "database": "{{string}}", "dbClusterOrInstanceArn": "{{string}}", "schema": "{{string}}", "sqlStatements": "{{string}}" } ``` ### Response #### Success Response (200) - **sqlStatementResults** (Array of SqlStatementResult objects) - The results of the SQL statement or statements. #### Response Example ```json { "sqlStatementResults": [ { "numberOfRecordsUpdated": number, "resultFrame": { "records": [ { "values": [ { ... } ] } ], "resultSetMetadata": { "columnCount": number, "columnMetadata": [ { "arrayBaseColumnType": number, "isAutoIncrement": boolean, "isCaseSensitive": boolean, "isCurrency": boolean, "isSigned": boolean, "label": "string", "name": "string", "nullable": number, "precision": number, "scale": number, "schemaName": "string", "tableName": "string", "type": number, "typeName": "string" } ] } } } ] } ``` ``` -------------------------------- ### ExecuteSql API Response Syntax Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ExecuteSql.md This is the JSON structure for a successful ExecuteSql API response. It contains an array of results for each SQL statement executed. ```json { "sqlStatementResults": [ { "numberOfRecordsUpdated": number, "resultFrame": { "records": [ { "values": [ { ... } ] } ], "resultSetMetadata": { "columnCount": number, "columnMetadata": [ { "arrayBaseColumnType": number, "isAutoIncrement": boolean, "isCaseSensitive": boolean, "isCurrency": boolean, "isSigned": boolean, "label": "string", "name": "string", "nullable": number, "precision": number, "scale": number, "schemaName": "string", "tableName": "string", "type": number, "typeName": "string" } ] } } } ] } ``` -------------------------------- ### ColumnMetadata Structure Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ColumnMetadata.md Defines the structure of the ColumnMetadata object, including all its properties, their types, and whether they are required. ```APIDOC ## ColumnMetadata Contains the metadata for a column. ### Properties * **arrayBaseColumnType** (Integer) - Optional - The type of the column. * **isAutoIncrement** (Boolean) - Optional - A value that indicates whether the column increments automatically. * **isCaseSensitive** (Boolean) - Optional - A value that indicates whether the column is case-sensitive. * **isCurrency** (Boolean) - Optional - A value that indicates whether the column contains currency values. * **isSigned** (Boolean) - Optional - A value that indicates whether an integer column is signed. * **label** (String) - Optional - The label for the column. * **name** (String) - Optional - The name of the column. * **nullable** (Integer) - Optional - A value that indicates whether the column is nullable. * **precision** (Integer) - Optional - The precision value of a decimal number column. * **scale** (Integer) - Optional - The scale value of a decimal number column. * **schemaName** (String) - Optional - The name of the schema that owns the table that includes the column. * **tableName** (String) - Optional - The name of the table that includes the column. * **type** (Integer) - Optional - The type of the column. * **typeName** (String) - Optional - The database-specific data type of the column. ``` -------------------------------- ### ExecuteStatement Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_Operations.md Executes a single SQL statement, potentially within a transaction. ```APIDOC ## ExecuteStatement ### Description Executes a single SQL statement. This can be used for standalone statements or as part of a transaction. ### Method POST ### Endpoint /ExecuteStatement ### Parameters #### Request Body - **SqlStatement** (string) - Required - The SQL statement to execute. - **DatabaseName** (string) - Optional - The name of the database to execute the statement against. - **TransactionId** (string) - Optional - The ID of the transaction to associate this statement with. ### Response #### Success Response (200) - **ExecutionResult** (object) - The result of the SQL statement execution. #### Response Example ```json { "ExecutionResult": { "Table nào": "result" } } ``` ``` -------------------------------- ### ResultSetOptions Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ResultSetOptions.md Controls how DECIMAL and LONG data types are represented in the response. Options include converting to String, Double, or Long, with recommendations to use String for precision-sensitive values. ```APIDOC ## ResultSetOptions ### Description Options that control how the result set is returned. This includes settings for `decimalReturnType` and `longReturnType`. ### Properties #### decimalReturnType - **Type**: String - **Valid Values**: `STRING | DOUBLE_OR_LONG` - **Required**: No - **Description**: Indicates how a field of `DECIMAL` type is represented. `STRING` (default) converts it to a String. `DOUBLE_OR_LONG` converts it to a Long if scale is 0, otherwise to a Double. Be aware of potential roundoff errors with `DOUBLE_OR_LONG`. ``` ```APIDOC #### longReturnType - **Type**: String - **Valid Values**: `STRING | LONG` - **Required**: No - **Description**: Indicates how a field of `LONG` type is represented. `LONG` (default) or `STRING`. Specify `STRING` to avoid truncation or rounding errors with large numeric values. ``` -------------------------------- ### CommitTransaction Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_CommitTransaction.md Ends a SQL transaction and commits the changes. Requires the resource ARN, secret ARN, and the transaction ID. ```APIDOC ## CommitTransaction ### Description Ends a SQL transaction started with the `BeginTransaction` operation and commits the changes. ### Method POST ### Endpoint /CommitTransaction ### Parameters #### Request Body - **resourceArn** (string) - Required - The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster. - **secretArn** (string) - Required - The name or ARN of the secret that enables access to the DB cluster. - **transactionId** (string) - Required - The identifier of the transaction to end and commit. ### Request Example ```json { "resourceArn": "{{string}}", "secretArn": "{{string}}", "transactionId": "{{string}}" } ``` ### Response #### Success Response (200) - **transactionStatus** (string) - The status of the commit operation. #### Response Example ```json { "transactionStatus": "string" } ``` ``` -------------------------------- ### CommitTransaction Request Syntax Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_CommitTransaction.md This is the standard request syntax for the CommitTransaction API operation. It uses a POST request with a JSON body containing resource ARN, secret ARN, and transaction ID. ```json POST /CommitTransaction HTTP/1.1 Content-type: application/json { "resourceArn": "{{string}}", "secretArn": "{{string}}", "transactionId": "{{string}}" } ``` -------------------------------- ### RollbackTransaction Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_Operations.md Rolls back an ongoing database transaction. ```APIDOC ## RollbackTransaction ### Description Discards all changes made within an active transaction. ### Method POST ### Endpoint /RollbackTransaction ### Parameters #### Request Body - **TransactionId** (string) - Required - The ID of the transaction to roll back. ### Response #### Success Response (200) - **Success** (boolean) - Indicates if the transaction was successfully rolled back. #### Response Example ```json { "Success": true } ``` ``` -------------------------------- ### UpdateResult Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_UpdateResult.md The UpdateResult object contains information about fields that were generated during an update request. It includes a list of generated fields, each with its own details. ```APIDOC ## UpdateResult ### Description The response elements represent the results of an update. This object contains information about fields generated during the request. ### Fields #### generatedFields - **generatedFields** (Array of [Field](API_Field.md) objects) - Optional - Values for fields generated during the request. ``` -------------------------------- ### CommitTransaction Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_Operations.md Commits an ongoing database transaction. ```APIDOC ## CommitTransaction ### Description Finalizes and saves all changes made within an active transaction. ### Method POST ### Endpoint /CommitTransaction ### Parameters #### Request Body - **TransactionId** (string) - Required - The ID of the transaction to commit. ### Response #### Success Response (200) - **Success** (boolean) - Indicates if the transaction was successfully committed. #### Response Example ```json { "Success": true } ``` ``` -------------------------------- ### ResultSetMetadata Type Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ResultSetMetadata.md The ResultSetMetadata type contains information about the columns in a SQL query result set. ```APIDOC ## ResultSetMetadata ### Description The metadata of the result set returned by a SQL statement. ### Properties - **columnCount** (Long) - Optional - The number of columns in the result set. - **columnMetadata** (Array of [ColumnMetadata](API_ColumnMetadata.md)) - Optional - The metadata of the columns in the result set. ``` -------------------------------- ### Field Data Type Structure Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_Field.md The Field data type is a union, meaning only one of its members can be specified at a time. It supports various data types for representing values. ```APIDOC ## Field Data Type ### Description Represents a single value that can be of various data types. ### Type This is a UNION type. Only one of the following members can be specified or returned. ### Members - **arrayValue** (ArrayValue object) - An array of values. Required: No. - **blobValue** (Base64-encoded binary data) - A value of BLOB data type. Required: No. - **booleanValue** (Boolean) - A value of Boolean data type. Required: No. - **doubleValue** (Double) - A value of double data type. Required: No. - **isNull** (Boolean) - Represents a NULL value. Required: No. - **longValue** (Long) - A value of long data type. Required: No. - **stringValue** (String) - A value of string data type. Required: No. ``` -------------------------------- ### ArrayValue Data Type Source: https://docs.aws.amazon.com/rdsdataservice/latest/APIReference/API_ArrayValue.md The ArrayValue data type is a union that can hold arrays of different primitive types or other ArrayValue objects. It is used to represent array parameters and results in the RDS Data API. ```APIDOC ## ArrayValue Contains an array. This data type is a UNION, so only one of the following members can be specified when used or returned. ### Members - **arrayValues** (Array of ArrayValue objects) - An array of arrays. Required: No - **booleanValues** (Array of booleans) - An array of Boolean values. Required: No - **doubleValues** (Array of doubles) - An array of floating-point numbers. Required: No - **longValues** (Array of longs) - An array of integers. Required: No - **stringValues** (Array of strings) - An array of strings. Required: No ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.