{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-rds/json-schema/amazon-rds-execute-statement-request-schema.json",
  "title": "ExecuteStatementRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-rds-operations-api-openapi.yml#/components/schemas/ExecuteStatementRequest",
  "type": "object",
  "properties": {
    "resourceArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster."
    },
    "secretArn": {
      "type": "string",
      "description": "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. When you use the CLI on Linux to reference a secret created in the RDS console, the ARN might include special characters like rds!cluster. If you enclose the ARN in double quotes, the ! character might trigger a shell expansion error, such as -bash: !cluster: event not found. To avoid this, escape the exclamation mark (\\!) in the ARN or enclose the entire ARN in single quotes (') instea"
    },
    "sql": {
      "type": "string",
      "description": "The SQL statement to run."
    },
    "database": {
      "type": "string",
      "description": "The name of the database."
    },
    "schema": {
      "type": "string",
      "description": "The name of the database schema. Currently, the schema parameter isn't supported."
    },
    "parameters": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SqlParameter"
      },
      "description": "The parameters for the SQL statement. Array parameters are not supported."
    },
    "transactionId": {
      "type": "string",
      "description": "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."
    },
    "includeResultMetadata": {
      "type": "boolean",
      "description": "A value that indicates whether to include metadata in the results."
    },
    "continueAfterTimeout": {
      "type": "boolean",
      "description": "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."
    },
    "resultSetOptions": {
      "$ref": "#/$defs/ResultSetOptions"
    },
    "formatRecordsAs": {
      "type": "string",
      "enum": [
        "NONE",
        "JSON"
      ],
      "description": "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."
    }
  },
  "required": [
    "resourceArn",
    "secretArn",
    "sql"
  ],
  "$defs": {
    "ArrayValue": {
      "type": "object",
      "properties": {
        "booleanValues": {
          "type": "array",
          "items": {
            "type": "boolean"
          },
          "description": "An array of Boolean values. Can contain null values."
        },
        "longValues": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "An array of integers. Can contain null values."
        },
        "doubleValues": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "description": "An array of floating-point numbers. Can contain null values."
        },
        "stringValues": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An array of strings. Can contain null values."
        },
        "arrayValues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ArrayValue"
          },
          "description": "An array of arrays. Can contain null values."
        }
      },
      "description": "Exactly one member is set."
    },
    "Field": {
      "type": "object",
      "properties": {
        "isNull": {
          "type": "boolean",
          "description": "A NULL value."
        },
        "booleanValue": {
          "type": "boolean",
          "description": "A value of Boolean data type."
        },
        "longValue": {
          "type": "integer",
          "description": "A value of long data type."
        },
        "doubleValue": {
          "type": "number",
          "description": "A value of double data type."
        },
        "stringValue": {
          "type": "string",
          "description": "A value of string data type."
        },
        "blobValue": {
          "type": "string",
          "format": "byte",
          "description": "A value of BLOB data type."
        },
        "arrayValue": {
          "$ref": "#/$defs/ArrayValue"
        }
      },
      "description": "Exactly one member is set."
    },
    "ResultSetOptions": {
      "type": "object",
      "properties": {
        "decimalReturnType": {
          "type": "string",
          "enum": [
            "STRING",
            "DOUBLE_OR_LONG"
          ],
          "description": "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",
          "enum": [
            "STRING",
            "LONG"
          ],
          "description": "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."
        }
      }
    },
    "SqlParameter": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the parameter."
        },
        "value": {
          "$ref": "#/$defs/Field"
        },
        "typeHint": {
          "type": "string",
          "enum": [
            "JSON",
            "UUID",
            "TIMESTAMP",
            "DATE",
            "TIME",
            "DECIMAL"
          ],
          "description": "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 corresp"
        }
      }
    }
  }
}