openapi: 3.1.0 info: title: Amazon Redshift Data API description: >- The Amazon Redshift Data API enables you to run SQL statements on Amazon Redshift clusters and Amazon Redshift Serverless workgroups without managing database connections or drivers. The Data API handles connection management, authentication via IAM or Secrets Manager, and supports asynchronous execution of SQL statements with result retrieval through a statement identifier. Ideal for building serverless applications, integrating with AWS Lambda, and running ad-hoc queries programmatically. version: '2019-12-20' contact: name: Amazon Web Services url: https://aws.amazon.com/redshift/ termsOfService: https://aws.amazon.com/service-terms/ license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html externalDocs: description: Amazon Redshift Data API Reference url: https://docs.aws.amazon.com/redshift-data/latest/APIReference/Welcome.html servers: - url: https://redshift-data.{region}.amazonaws.com description: Amazon Redshift Data API regional endpoint variables: region: default: us-east-1 description: AWS region identifier enum: - us-east-1 - us-east-2 - us-west-1 - us-west-2 - eu-west-1 - eu-west-2 - eu-central-1 - ap-southeast-1 - ap-southeast-2 - ap-northeast-1 - ap-northeast-2 - ca-central-1 - sa-east-1 tags: - name: Metadata description: List databases, schemas, and tables in a Redshift data warehouse - name: Result Retrieval description: Retrieve results from completed SQL statement executions - name: Statement Execution description: Execute SQL statements against Amazon Redshift clusters or serverless workgroups - name: Statement Management description: Describe, list, and cancel SQL statement executions security: - sigv4Auth: [] paths: /ExecuteStatement: post: operationId: executeStatement summary: Amazon Redshift Execute a Sql Statement description: >- Runs a SQL statement against an Amazon Redshift cluster or Amazon Redshift Serverless workgroup. The SQL statement runs asynchronously and returns a statement identifier that you can use to check the status with DescribeStatement and retrieve results with GetStatementResult. The maximum query result size is 100 MB. tags: - Statement Execution requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ExecuteStatementRequest' responses: '200': description: Statement submitted successfully content: application/json: schema: $ref: '#/components/schemas/ExecuteStatementResponse' '400': description: Invalid request - validation error content: application/json: schema: $ref: '#/components/schemas/ValidationException' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerException' '503': description: Service temporarily unavailable - the cluster is paused content: application/json: schema: $ref: '#/components/schemas/ActiveStatementsExceededException' x-microcks-operation: delay: 0 dispatcher: FALLBACK /BatchExecuteStatement: post: operationId: batchExecuteStatement summary: Amazon Redshift Execute Multiple Sql Statements in a Batch description: >- Runs one or more SQL statements as a batch, which run as a single transaction. The statements run serially in the order provided. Returns a statement identifier for the batch that you can use with DescribeStatement and GetStatementResult. tags: - Statement Execution requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BatchExecuteStatementRequest' responses: '200': description: Batch statement submitted successfully content: application/json: schema: $ref: '#/components/schemas/BatchExecuteStatementResponse' '400': description: Invalid request - validation error content: application/json: schema: $ref: '#/components/schemas/ValidationException' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerException' x-microcks-operation: delay: 0 dispatcher: FALLBACK /DescribeStatement: post: operationId: describeStatement summary: Amazon Redshift Describe a Sql Statement Execution description: >- Describes the details about a specific SQL statement run, including the status, duration, result size, and error information. Use the statement identifier returned by ExecuteStatement or BatchExecuteStatement to identify the statement. tags: - Statement Management requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DescribeStatementRequest' responses: '200': description: Statement details retrieved successfully content: application/json: schema: $ref: '#/components/schemas/DescribeStatementResponse' '400': description: Invalid request - validation error content: application/json: schema: $ref: '#/components/schemas/ValidationException' '404': description: Statement not found content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerException' x-microcks-operation: delay: 0 dispatcher: FALLBACK /ListStatements: post: operationId: listStatements summary: Amazon Redshift List Sql Statement Executions description: >- Lists SQL statements that have been submitted. By default, only finished statements are shown. You can filter by status and optionally include statements submitted by all IAM users by setting RoleLevel to true. Results are ordered by creation time, with the most recent statements listed first. tags: - Statement Management requestBody: required: false content: application/json: schema: $ref: '#/components/schemas/ListStatementsRequest' responses: '200': description: Statement list retrieved successfully content: application/json: schema: $ref: '#/components/schemas/ListStatementsResponse' '400': description: Invalid request - validation error content: application/json: schema: $ref: '#/components/schemas/ValidationException' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerException' x-microcks-operation: delay: 0 dispatcher: FALLBACK /CancelStatement: post: operationId: cancelStatement summary: Amazon Redshift Cancel a Running Sql Statement description: >- Cancels a running SQL statement. The statement must be in the STARTED or SUBMITTED state to be cancelled. tags: - Statement Management requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CancelStatementRequest' responses: '200': description: Statement cancelled successfully content: application/json: schema: $ref: '#/components/schemas/CancelStatementResponse' '400': description: Invalid request - validation error content: application/json: schema: $ref: '#/components/schemas/ValidationException' '404': description: Statement not found content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerException' x-microcks-operation: delay: 0 dispatcher: FALLBACK /GetStatementResult: post: operationId: getStatementResult summary: Amazon Redshift Get the Results of a Sql Statement description: >- Fetches the result of a SQL statement that was submitted with ExecuteStatement or BatchExecuteStatement. The statement must have completed successfully (status FINISHED). Results are paginated and the maximum result size is 100 MB. Use the NextToken parameter to retrieve subsequent pages. tags: - Result Retrieval requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GetStatementResultRequest' responses: '200': description: Statement results retrieved successfully content: application/json: schema: $ref: '#/components/schemas/GetStatementResultResponse' '400': description: Invalid request - validation error content: application/json: schema: $ref: '#/components/schemas/ValidationException' '404': description: Statement not found content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerException' x-microcks-operation: delay: 0 dispatcher: FALLBACK /ListDatabases: post: operationId: listDatabases summary: Amazon Redshift List Databases in a Cluster or Workgroup description: >- Lists the databases in a cluster or workgroup. The databases are retrieved from the system catalog. A token is returned to page through the database list. tags: - Metadata requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ListDatabasesRequest' responses: '200': description: Database list retrieved successfully content: application/json: schema: $ref: '#/components/schemas/ListDatabasesResponse' '400': description: Invalid request - validation error content: application/json: schema: $ref: '#/components/schemas/ValidationException' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerException' x-microcks-operation: delay: 0 dispatcher: FALLBACK /ListSchemas: post: operationId: listSchemas summary: Amazon Redshift List Schemas in a Database description: >- Lists the schemas in a database. A token is returned to page through the schema list. You can filter the results by providing a schema name pattern. tags: - Metadata requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ListSchemasRequest' responses: '200': description: Schema list retrieved successfully content: application/json: schema: $ref: '#/components/schemas/ListSchemasResponse' '400': description: Invalid request - validation error content: application/json: schema: $ref: '#/components/schemas/ValidationException' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerException' x-microcks-operation: delay: 0 dispatcher: FALLBACK /ListTables: post: operationId: listTables summary: Amazon Redshift List Tables in a Schema description: >- Lists the tables in a database. You can filter by schema or table name pattern. A token is returned to page through the table list. tags: - Metadata requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ListTablesRequest' responses: '200': description: Table list retrieved successfully content: application/json: schema: $ref: '#/components/schemas/ListTablesResponse' '400': description: Invalid request - validation error content: application/json: schema: $ref: '#/components/schemas/ValidationException' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerException' x-microcks-operation: delay: 0 dispatcher: FALLBACK /DescribeTable: post: operationId: describeTable summary: Amazon Redshift Describe the Columns of a Table description: >- Describes the detailed information about a table and its columns. Returns column names, data types, and other metadata for a specified table. tags: - Metadata requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DescribeTableRequest' responses: '200': description: Table description retrieved successfully content: application/json: schema: $ref: '#/components/schemas/DescribeTableResponse' '400': description: Invalid request - validation error content: application/json: schema: $ref: '#/components/schemas/ValidationException' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/InternalServerException' x-microcks-operation: delay: 0 dispatcher: FALLBACK components: securitySchemes: sigv4Auth: type: apiKey name: Authorization in: header description: >- AWS Signature Version 4 authentication. Requests are signed using IAM credentials. The Data API also supports authentication via AWS Secrets Manager for database credentials or temporary IAM credentials. schemas: ExecuteStatementRequest: type: object required: - Database - Sql properties: ClusterIdentifier: type: string description: >- The cluster identifier. Required when connecting to a provisioned cluster. Mutually exclusive with WorkgroupName. example: my-redshift-cluster Database: type: string description: The name of the database to run the SQL statement against example: dev DbUser: type: string description: >- The database user name. Required when authenticating with temporary credentials from GetClusterCredentials. example: example_value SecretArn: type: string description: >- The ARN of the secret stored in AWS Secrets Manager that contains the database credentials. Mutually exclusive with DbUser and temporary credentials. example: arn:aws:secretsmanager:us-east-1:123456789012:secret:my-redshift-secret-AbCdEf Sql: type: string description: The SQL statement to run. Maximum length is 100,000 characters. maxLength: 100000 example: SELECT * FROM sales ORDER BY sale_date DESC LIMIT 10 StatementName: type: string description: >- A name for the SQL statement. This name can be used to identify the query in the ListStatements output. example: my-sales-query WithEvent: type: boolean description: >- Whether to send an event to Amazon EventBridge when the SQL statement completes. Default is false. default: false example: true WorkgroupName: type: string description: >- The serverless workgroup name. Required when connecting to Redshift Serverless. Mutually exclusive with ClusterIdentifier. example: my-workgroup Parameters: type: array description: >- Named parameters for the SQL statement. Use :name syntax in the SQL string to reference parameters. items: $ref: '#/components/schemas/SqlParameter' example: [] ClientToken: type: string description: >- A unique, case-sensitive identifier to ensure idempotency of the request. example: example_value BatchExecuteStatementRequest: type: object required: - Database - Sqls properties: ClusterIdentifier: type: string description: The cluster identifier for a provisioned cluster example: example_value Database: type: string description: The name of the database example: example_value DbUser: type: string description: The database user name for temporary credentials example: example_value SecretArn: type: string description: ARN of the secret in AWS Secrets Manager example: example_value Sqls: type: array description: >- One or more SQL statements to run. The statements run serially as a single transaction. Maximum 40 statements. items: type: string minItems: 1 maxItems: 40 example: [] StatementName: type: string description: A name for the batch SQL statement example: example_value WithEvent: type: boolean description: Whether to send an event to EventBridge on completion default: false example: true WorkgroupName: type: string description: The serverless workgroup name example: example_value ClientToken: type: string description: Idempotency token example: example_value DescribeStatementRequest: type: object required: - Id properties: Id: type: string format: uuid description: >- The identifier of the SQL statement to describe. This value is returned by ExecuteStatement or BatchExecuteStatement. example: c016234e-5c6c-4bc5-bb66-2c776b0e92db ListStatementsRequest: type: object properties: MaxResults: type: integer description: >- The maximum number of SQL statements to return in the response. Valid range is 0 to 100. Default is 100. minimum: 0 maximum: 100 default: 100 example: 10 NextToken: type: string description: >- A value that indicates the starting point for the next set of response records in a subsequent request. example: example_value RoleLevel: type: boolean description: >- When true, returns statements submitted by all IAM users in the account. Default is false, which returns only statements from the calling user. default: false example: true StatementName: type: string description: Filter results by a specific statement name example: example_value Status: type: string description: Filter results by statement status enum: - SUBMITTED - PICKED - STARTED - FINISHED - ABORTED - FAILED - ALL example: SUBMITTED CancelStatementRequest: type: object required: - Id properties: Id: type: string format: uuid description: The identifier of the SQL statement to cancel example: abc123 GetStatementResultRequest: type: object required: - Id properties: Id: type: string format: uuid description: The identifier of the SQL statement whose results to fetch example: abc123 NextToken: type: string description: A pagination token for the next page of results example: example_value ListDatabasesRequest: type: object required: - Database properties: ClusterIdentifier: type: string description: The cluster identifier example: example_value Database: type: string description: >- The name of the database to use for connection. For provisioned clusters this is typically 'dev'. example: example_value DbUser: type: string description: The database user for temporary credentials example: example_value SecretArn: type: string description: ARN of the secret in Secrets Manager example: example_value WorkgroupName: type: string description: The serverless workgroup name example: example_value MaxResults: type: integer description: Maximum number of databases to return minimum: 0 maximum: 1000 example: 10 NextToken: type: string description: Pagination token for the next page example: example_value ListSchemasRequest: type: object required: - Database properties: ClusterIdentifier: type: string description: The cluster identifier example: example_value Database: type: string description: The name of the database containing the schemas example: example_value DbUser: type: string description: The database user for temporary credentials example: example_value SecretArn: type: string description: ARN of the secret in Secrets Manager example: example_value WorkgroupName: type: string description: The serverless workgroup name example: example_value SchemaPattern: type: string description: >- A pattern to filter schemas. Uses SQL LIKE syntax where underscore matches one character and percent matches zero or more characters. example: public% MaxResults: type: integer description: Maximum number of schemas to return minimum: 0 maximum: 1000 example: 10 NextToken: type: string description: Pagination token for the next page example: example_value ListTablesRequest: type: object required: - Database properties: ClusterIdentifier: type: string description: The cluster identifier example: example_value Database: type: string description: The name of the database containing the tables example: example_value DbUser: type: string description: The database user for temporary credentials example: example_value SecretArn: type: string description: ARN of the secret in Secrets Manager example: example_value WorkgroupName: type: string description: The serverless workgroup name example: example_value SchemaPattern: type: string description: A schema name pattern to filter tables example: example_value TablePattern: type: string description: A table name pattern to filter tables example: sales% MaxResults: type: integer description: Maximum number of tables to return minimum: 0 maximum: 1000 example: 10 NextToken: type: string description: Pagination token for the next page example: example_value DescribeTableRequest: type: object required: - Database properties: ClusterIdentifier: type: string description: The cluster identifier example: example_value Database: type: string description: The name of the database example: example_value DbUser: type: string description: The database user for temporary credentials example: example_value SecretArn: type: string description: ARN of the secret in Secrets Manager example: example_value WorkgroupName: type: string description: The serverless workgroup name example: example_value Table: type: string description: >- The table name. Can be qualified with schema name as schema_name.table_name. example: public.sales Schema: type: string description: The schema that contains the table. Default is public. default: public example: example_value MaxResults: type: integer description: Maximum number of columns to return minimum: 0 maximum: 1000 example: 10 NextToken: type: string description: Pagination token for the next page example: example_value ExecuteStatementResponse: type: object properties: Id: type: string format: uuid description: The identifier of the SQL statement example: abc123 CreatedAt: type: string format: date-time description: The date and time the statement was created example: '2026-01-15T10:30:00Z' Database: type: string description: The name of the database example: example_value DbUser: type: string description: The database user example: example_value ClusterIdentifier: type: string description: The cluster identifier example: example_value WorkgroupName: type: string description: The serverless workgroup name example: example_value SecretArn: type: string description: The secret ARN used for authentication example: example_value BatchExecuteStatementResponse: type: object properties: Id: type: string format: uuid description: The identifier of the batch SQL statement example: abc123 CreatedAt: type: string format: date-time description: The date and time the batch statement was created example: '2026-01-15T10:30:00Z' Database: type: string description: The name of the database example: example_value DbUser: type: string description: The database user example: example_value ClusterIdentifier: type: string description: The cluster identifier example: example_value WorkgroupName: type: string description: The serverless workgroup name example: example_value SecretArn: type: string description: The secret ARN used for authentication example: example_value DescribeStatementResponse: type: object properties: Id: type: string format: uuid description: The identifier of the SQL statement example: abc123 Status: type: string description: The status of the SQL statement enum: - SUBMITTED - PICKED - STARTED - FINISHED - ABORTED - FAILED example: SUBMITTED CreatedAt: type: string format: date-time description: The date and time the statement was created example: '2026-01-15T10:30:00Z' UpdatedAt: type: string format: date-time description: The date and time the statement was last updated example: '2026-01-15T10:30:00Z' Duration: type: integer format: int64 description: The time in nanoseconds the statement ran example: 10 QueryString: type: string description: The SQL statement that was executed example: example_value QueryParameters: type: array description: The parameters for the SQL statement items: $ref: '#/components/schemas/SqlParameter' example: [] Database: type: string description: The name of the database example: example_value DbUser: type: string description: The database user example: example_value ClusterIdentifier: type: string description: The cluster identifier example: example_value WorkgroupName: type: string description: The serverless workgroup name example: example_value SecretArn: type: string description: The secret ARN example: example_value RedshiftPid: type: integer format: int64 description: The process identifier from the Redshift cluster example: '500123' RedshiftQueryId: type: integer format: int64 description: The Redshift query identifier example: '500123' ResultRows: type: integer format: int64 description: Total number of rows in the result set (FINISHED only) example: 10 ResultSize: type: integer format: int64 description: The size of the result set in bytes example: 10 HasResultSet: type: boolean description: Whether the statement has a result set example: true Error: type: string description: The error message if the statement failed example: example_value SubStatements: type: array description: >- List of sub-statements for a batch execution. Only present for BatchExecuteStatement calls. items: $ref: '#/components/schemas/SubStatementData' example: [] ListStatementsResponse: type: object required: - Statements properties: Statements: type: array description: List of SQL statements items: $ref: '#/components/schemas/StatementData' example: [] NextToken: type: string description: >- A pagination token to retrieve the next set of results. Null if there are no more results. example: example_value CancelStatementResponse: type: object properties: Status: type: boolean description: Whether the cancel request was successful example: true GetStatementResultResponse: type: object required: - Records properties: Records: type: array description: The results of the SQL statement as an array of rows items: type: array description: A single row of results items: $ref: '#/components/schemas/Field' example: [] ColumnMetadata: type: array description: Metadata about the columns in the result set items: $ref: '#/components/schemas/ColumnMetadata' example: [] TotalNumRows: type: integer format: int64 description: Total number of rows in the result set example: 10 NextToken: type: string description: Pagination token for the next page of results example: example_value ListDatabasesResponse: type: object properties: Databases: type: array description: List of database names items: type: string example: [] NextToken: type: string description: Pagination token for the next page example: example_value ListSchemasResponse: type: object properties: Schemas: type: array description: List of schema names items: type: string example: [] NextToken: type: string description: Pagination token for the next page example: example_value ListTablesResponse: type: object properties: Tables: type: array description: List of tables items: $ref: '#/components/schemas/TableMember' example: [] NextToken: type: string description: Pagination token for the next page example: example_value DescribeTableResponse: type: object properties: TableName: type: string description: The name of the table example: example_value ColumnList: type: array description: List of column definitions for the table items: $ref: '#/components/schemas/ColumnMetadata' example: [] NextToken: type: string description: Pagination token for the next page example: example_value SqlParameter: type: object required: - name - value properties: name: type: string description: The name of the parameter (without the colon prefix) example: sale_date value: type: string description: The value of the parameter example: '2025-01-01' StatementData: type: object required: - Id properties: Id: type: string format: uuid description: The identifier of the SQL statement example: abc123 StatementName: type: string description: The name of the SQL statement example: example_value Status: type: string description: The status of the SQL statement enum: - SUBMITTED - PICKED - STARTED - FINISHED - ABORTED - FAILED example: SUBMITTED CreatedAt: type: string format: date-time description: The date and time the statement was created example: '2026-01-15T10:30:00Z' UpdatedAt: type: string format: date-time description: The date and time the statement was last updated example: '2026-01-15T10:30:00Z' QueryString: type: string description: The SQL statement text example: example_value QueryParameters: type: array description: The query parameters items: $ref: '#/components/schemas/SqlParameter' example: [] Database: type: string description: The name of the database example: example_value ClusterIdentifier: type: string description: The cluster identifier example: example_value WorkgroupName: type: string description: The serverless workgroup name example: example_value SecretArn: type: string description: The secret ARN example: example_value IsBatchStatement: type: boolean description: Whether this is a batch statement example: true SubStatementData: type: object required: - Id properties: Id: type: string description: The identifier of the sub-statement example: abc123 Status: type: string description: The status of the sub-statement enum: - SUBMITTED - PICKED - STARTED - FINISHED - ABORTED - FAILED example: SUBMITTED CreatedAt: type: string format: date-time description: The date and time the sub-statement was created example: '2026-01-15T10:30:00Z' UpdatedAt: type: string format: date-time description: The date and time the sub-statement was last updated example: '2026-01-15T10:30:00Z' Duration: type: integer format: int64 description: The time in nanoseconds the sub-statement ran example: 10 QueryString: type: string description: The SQL statement text example: example_value RedshiftQueryId: type: integer format: int64 description: The Redshift query identifier example: '500123' ResultRows: type: integer format: int64 description: Total number of rows in the result set example: 10 ResultSize: type: integer format: int64 description: The size of the result set in bytes example: 10 HasResultSet: type: boolean description: Whether the sub-statement has a result set example: true Error: type: string description: The error message if the sub-statement failed example: example_value ColumnMetadata: type: object properties: name: type: string description: The name of the column example: Example Title label: type: string description: The label of the column (display name) example: Example Title typeName: type: string description: >- The database-specific data type name of the column example: varchar columnDefault: type: string description: The default value for the column example: example_value isCaseSensitive: type: boolean description: Whether the column is case-sensitive example: true isCurrency: type: boolean description: Whether the column contains currency data example: true isSigned: type: boolean description: Whether the column values are signed numbers example: true nullable: type: integer description: >- Indicates the nullability of the column. 0 = not nullable, 1 = nullable, 2 = unknown. enum: - 0 - 1 - 2 example: 0 precision: type: integer description: The precision of the column for numeric types example: 10 scale: type: integer description: The scale of the column for numeric types example: 10 length: type: integer description: The length of the column for character types example: 10 schemaName: type: string description: The schema name that contains the table example: example_value tableName: type: string description: The name of the table that contains the column example: example_value Field: type: object description: >- A single value in a result row. Exactly one of the typed properties will be present, corresponding to the column data type. properties: blobValue: type: string format: byte description: A value in binary format example: example_value booleanValue: type: boolean description: A boolean value example: true doubleValue: type: number format: double description: A double-precision floating point value example: 42.5 isNull: type: boolean description: Whether the value is null example: true longValue: type: integer format: int64 description: A long integer value example: 10 stringValue: type: string description: A string value example: example_value TableMember: type: object properties: name: type: string description: The name of the table example: Example Title type: type: string description: The type of the table (TABLE, VIEW, etc.) example: example_value schema: type: string description: The schema that contains the table example: example_value ValidationException: type: object properties: Message: type: string description: A description of the validation error example: example_value InternalServerException: type: object properties: Message: type: string description: A description of the internal server error example: example_value ResourceNotFoundException: type: object properties: Message: type: string description: A description of the resource not found error example: example_value ResourceId: type: string description: The identifier of the resource that was not found example: '500123' ActiveStatementsExceededException: type: object properties: Message: type: string description: >- A description indicating the maximum number of active statements has been exceeded example: example_value