{ "version": "2.0", "metadata": { "apiVersion": "2019-12-20", "endpointPrefix": "redshift-data", "jsonVersion": "1.1", "protocol": "json", "protocols": [ "json" ], "serviceFullName": "Redshift Data API Service", "serviceId": "Redshift Data", "signatureVersion": "v4", "signingName": "redshift-data", "targetPrefix": "RedshiftData", "uid": "redshift-data-2019-12-20" }, "operations": { "BatchExecuteStatement": { "name": "BatchExecuteStatement", "http": { "method": "POST", "requestUri": "/" }, "input": { "shape": "BatchExecuteStatementInput" }, "output": { "shape": "BatchExecuteStatementOutput" }, "errors": [ { "shape": "ValidationException" }, { "shape": "ActiveSessionsExceededException" }, { "shape": "ActiveStatementsExceededException" }, { "shape": "BatchExecuteStatementException" }, { "shape": "InternalServerException" } ], "documentation": "
Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL). Depending on the authorization method, use one of the following combinations of request parameters:
Secrets Manager - when connecting to a cluster, provide the secret-arn
of a secret stored in Secrets Manager which has username
and password
. The specified secret contains credentials to connect to the database
you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier
), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.
Temporary credentials - when connecting to your data warehouse, choose one of the following options:
When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
has the database user name IAM:foo
. Also, permission to call the redshift-serverless:GetCredentials
operation is required.
When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
has the database user name IAM:foo
. Also, permission to call the redshift:GetClusterCredentialsWithIAM
operation is required.
When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
" }, "CancelStatement": { "name": "CancelStatement", "http": { "method": "POST", "requestUri": "/" }, "input": { "shape": "CancelStatementRequest" }, "output": { "shape": "CancelStatementResponse" }, "errors": [ { "shape": "ValidationException" }, { "shape": "ResourceNotFoundException" }, { "shape": "InternalServerException" }, { "shape": "DatabaseConnectionException" } ], "documentation": "Cancels a running query. To be canceled, a query must be running.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
" }, "DescribeStatement": { "name": "DescribeStatement", "http": { "method": "POST", "requestUri": "/" }, "input": { "shape": "DescribeStatementRequest" }, "output": { "shape": "DescribeStatementResponse" }, "errors": [ { "shape": "ValidationException" }, { "shape": "ResourceNotFoundException" }, { "shape": "InternalServerException" } ], "documentation": "Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The information includes when the query started, when it finished, the query status, the number of rows returned, and the SQL statement.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
" }, "DescribeTable": { "name": "DescribeTable", "http": { "method": "POST", "requestUri": "/" }, "input": { "shape": "DescribeTableRequest" }, "output": { "shape": "DescribeTableResponse" }, "errors": [ { "shape": "ValidationException" }, { "shape": "QueryTimeoutException" }, { "shape": "InternalServerException" }, { "shape": "DatabaseConnectionException" } ], "documentation": "Describes the detailed information about a table from metadata in the cluster. The information includes its columns. A token is returned to page through the column list. Depending on the authorization method, use one of the following combinations of request parameters:
Secrets Manager - when connecting to a cluster, provide the secret-arn
of a secret stored in Secrets Manager which has username
and password
. The specified secret contains credentials to connect to the database
you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier
), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.
Temporary credentials - when connecting to your data warehouse, choose one of the following options:
When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
has the database user name IAM:foo
. Also, permission to call the redshift-serverless:GetCredentials
operation is required.
When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
has the database user name IAM:foo
. Also, permission to call the redshift:GetClusterCredentialsWithIAM
operation is required.
When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
" }, "ExecuteStatement": { "name": "ExecuteStatement", "http": { "method": "POST", "requestUri": "/" }, "input": { "shape": "ExecuteStatementInput" }, "output": { "shape": "ExecuteStatementOutput" }, "errors": [ { "shape": "ValidationException" }, { "shape": "ActiveSessionsExceededException" }, { "shape": "ExecuteStatementException" }, { "shape": "ActiveStatementsExceededException" }, { "shape": "InternalServerException" } ], "documentation": "Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL). This statement must be a single SQL statement. Depending on the authorization method, use one of the following combinations of request parameters:
Secrets Manager - when connecting to a cluster, provide the secret-arn
of a secret stored in Secrets Manager which has username
and password
. The specified secret contains credentials to connect to the database
you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier
), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.
Temporary credentials - when connecting to your data warehouse, choose one of the following options:
When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
has the database user name IAM:foo
. Also, permission to call the redshift-serverless:GetCredentials
operation is required.
When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
has the database user name IAM:foo
. Also, permission to call the redshift:GetClusterCredentialsWithIAM
operation is required.
When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
" }, "GetStatementResult": { "name": "GetStatementResult", "http": { "method": "POST", "requestUri": "/" }, "input": { "shape": "GetStatementResultRequest" }, "output": { "shape": "GetStatementResultResponse" }, "errors": [ { "shape": "ValidationException" }, { "shape": "ResourceNotFoundException" }, { "shape": "InternalServerException" } ], "documentation": "Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement results.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
" }, "ListDatabases": { "name": "ListDatabases", "http": { "method": "POST", "requestUri": "/" }, "input": { "shape": "ListDatabasesRequest" }, "output": { "shape": "ListDatabasesResponse" }, "errors": [ { "shape": "ValidationException" }, { "shape": "QueryTimeoutException" }, { "shape": "InternalServerException" }, { "shape": "DatabaseConnectionException" } ], "documentation": "List the databases in a cluster. A token is returned to page through the database list. Depending on the authorization method, use one of the following combinations of request parameters:
Secrets Manager - when connecting to a cluster, provide the secret-arn
of a secret stored in Secrets Manager which has username
and password
. The specified secret contains credentials to connect to the database
you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier
), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.
Temporary credentials - when connecting to your data warehouse, choose one of the following options:
When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
has the database user name IAM:foo
. Also, permission to call the redshift-serverless:GetCredentials
operation is required.
When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
has the database user name IAM:foo
. Also, permission to call the redshift:GetClusterCredentialsWithIAM
operation is required.
When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
" }, "ListSchemas": { "name": "ListSchemas", "http": { "method": "POST", "requestUri": "/" }, "input": { "shape": "ListSchemasRequest" }, "output": { "shape": "ListSchemasResponse" }, "errors": [ { "shape": "ValidationException" }, { "shape": "QueryTimeoutException" }, { "shape": "InternalServerException" }, { "shape": "DatabaseConnectionException" } ], "documentation": "Lists the schemas in a database. A token is returned to page through the schema list. Depending on the authorization method, use one of the following combinations of request parameters:
Secrets Manager - when connecting to a cluster, provide the secret-arn
of a secret stored in Secrets Manager which has username
and password
. The specified secret contains credentials to connect to the database
you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier
), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.
Temporary credentials - when connecting to your data warehouse, choose one of the following options:
When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
has the database user name IAM:foo
. Also, permission to call the redshift-serverless:GetCredentials
operation is required.
When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
has the database user name IAM:foo
. Also, permission to call the redshift:GetClusterCredentialsWithIAM
operation is required.
When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
" }, "ListStatements": { "name": "ListStatements", "http": { "method": "POST", "requestUri": "/" }, "input": { "shape": "ListStatementsRequest" }, "output": { "shape": "ListStatementsResponse" }, "errors": [ { "shape": "ValidationException" }, { "shape": "InternalServerException" } ], "documentation": "List of SQL statements. By default, only finished statements are shown. A token is returned to page through the statement list.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
" }, "ListTables": { "name": "ListTables", "http": { "method": "POST", "requestUri": "/" }, "input": { "shape": "ListTablesRequest" }, "output": { "shape": "ListTablesResponse" }, "errors": [ { "shape": "ValidationException" }, { "shape": "QueryTimeoutException" }, { "shape": "InternalServerException" }, { "shape": "DatabaseConnectionException" } ], "documentation": "List the tables in a database. If neither SchemaPattern
nor TablePattern
are specified, then all tables in the database are returned. A token is returned to page through the table list. Depending on the authorization method, use one of the following combinations of request parameters:
Secrets Manager - when connecting to a cluster, provide the secret-arn
of a secret stored in Secrets Manager which has username
and password
. The specified secret contains credentials to connect to the database
you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (dbClusterIdentifier
), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.
Temporary credentials - when connecting to your data warehouse, choose one of the following options:
When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
has the database user name IAM:foo
. Also, permission to call the redshift-serverless:GetCredentials
operation is required.
When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, arn:iam::123456789012:user:foo
has the database user name IAM:foo
. Also, permission to call the redshift:GetClusterCredentialsWithIAM
operation is required.
When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the redshift:GetClusterCredentials
operation is required.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
" } }, "shapes": { "BatchExecuteStatementInput": { "type": "structure", "required": [ "Sqls" ], "members": { "ClientToken": { "shape": "ClientToken", "documentation": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
", "idempotencyToken": true }, "ClusterIdentifier": { "shape": "ClusterIdentifierString", "documentation": "The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
" }, "Database": { "shape": "String", "documentation": "The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.
" }, "DbUser": { "shape": "String", "documentation": "The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.
" }, "SecretArn": { "shape": "SecretArn", "documentation": "The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.
" }, "SessionId": { "shape": "UUID", "documentation": "The session identifier of the query.
" }, "SessionKeepAliveSeconds": { "shape": "SessionAliveSeconds", "documentation": "The number of seconds to keep the session alive after the query finishes. The maximum time a session can keep alive is 24 hours. After 24 hours, the session is forced closed and the query is terminated.
" }, "Sqls": { "shape": "SqlList", "documentation": "One or more SQL statements to run.
The SQL statements are run as a single transaction. They run serially in the order of the array. Subsequent SQL statements don't start until the previous statement in the array completes. If any SQL statement fails, then because they are run as one transaction, all work is rolled back.</p>
"
},
"StatementName": {
"shape": "StatementNameString",
"documentation": "The name of the SQL statements. You can name the SQL statements when you create them to identify the query.
" }, "WithEvent": { "shape": "Boolean", "documentation": "A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run.
" }, "WorkgroupName": { "shape": "WorkgroupNameString", "documentation": "The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
" } } }, "BatchExecuteStatementOutput": { "type": "structure", "members": { "ClusterIdentifier": { "shape": "ClusterIdentifierString", "documentation": "The cluster identifier. This element is not returned when connecting to a serverless workgroup.
" }, "CreatedAt": { "shape": "Timestamp", "documentation": "The date and time (UTC) the statement was created.
" }, "Database": { "shape": "String", "documentation": "The name of the database.
" }, "DbGroups": { "shape": "DbGroupList", "documentation": "A list of colon (:) separated names of database groups.
" }, "DbUser": { "shape": "String", "documentation": "The database user name.
" }, "Id": { "shape": "UUID", "documentation": "The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. This identifier is returned by BatchExecuteStatment
.
The name or ARN of the secret that enables access to the database.
" }, "SessionId": { "shape": "UUID", "documentation": "The session identifier of the query.
" }, "WorkgroupName": { "shape": "WorkgroupNameString", "documentation": "The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a provisioned cluster.
" } } }, "Blob": { "type": "blob" }, "Boolean": { "type": "boolean", "box": true }, "BoxedBoolean": { "type": "boolean", "box": true }, "BoxedDouble": { "type": "double", "box": true }, "BoxedLong": { "type": "long", "box": true }, "CancelStatementRequest": { "type": "structure", "required": [ "Id" ], "members": { "Id": { "shape": "UUID", "documentation": "The identifier of the SQL statement to cancel. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. This identifier is returned by BatchExecuteStatment
, ExecuteStatment
, and ListStatements
.
A value that indicates whether the cancel statement succeeded (true).
" } } }, "ClientToken": { "type": "string", "max": 64, "min": 1 }, "ClusterIdentifierString": { "type": "string", "max": 63, "min": 1, "pattern": "^[a-z]([a-z0-9]|-[a-z0-9])*$" }, "ColumnList": { "type": "list", "member": { "shape": "ColumnMetadata" } }, "ColumnMetadata": { "type": "structure", "members": { "columnDefault": { "shape": "String", "documentation": "The default value of the column.
" }, "isCaseSensitive": { "shape": "bool", "documentation": "A value that indicates whether the column is case-sensitive.
" }, "isCurrency": { "shape": "bool", "documentation": "A value that indicates whether the column contains currency values.
" }, "isSigned": { "shape": "bool", "documentation": "A value that indicates whether an integer column is signed.
" }, "label": { "shape": "String", "documentation": "The label for the column.
" }, "length": { "shape": "Integer", "documentation": "The length of the column.
" }, "name": { "shape": "String", "documentation": "The name of the column.
" }, "nullable": { "shape": "Integer", "documentation": "A value that indicates whether the column is nullable.
" }, "precision": { "shape": "Integer", "documentation": "The precision value of a decimal number column.
" }, "scale": { "shape": "Integer", "documentation": "The scale value of a decimal number column.
" }, "schemaName": { "shape": "String", "documentation": "The name of the schema that contains the table that includes the column.
" }, "tableName": { "shape": "String", "documentation": "The name of the table that includes the column.
" }, "typeName": { "shape": "String", "documentation": "The database-specific data type of the column.
" } }, "documentation": "The properties (metadata) of a column.
" }, "ColumnMetadataList": { "type": "list", "member": { "shape": "ColumnMetadata" } }, "DatabaseList": { "type": "list", "member": { "shape": "String" } }, "DbGroupList": { "type": "list", "member": { "shape": "String" } }, "DescribeStatementRequest": { "type": "structure", "required": [ "Id" ], "members": { "Id": { "shape": "UUID", "documentation": "The identifier of the SQL statement to describe. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2
has a suffix of :2
that indicates the second SQL statement of a batch query. This identifier is returned by BatchExecuteStatment
, ExecuteStatement
, and ListStatements
.
The cluster identifier.
" }, "CreatedAt": { "shape": "Timestamp", "documentation": "The date and time (UTC) when the SQL statement was submitted to run.
" }, "Database": { "shape": "String", "documentation": "The name of the database.
" }, "DbUser": { "shape": "String", "documentation": "The database user name.
" }, "Duration": { "shape": "Long", "documentation": "The amount of time in nanoseconds that the statement ran.
" }, "Error": { "shape": "String", "documentation": "The error message from the cluster if the SQL statement encountered an error while running.
" }, "HasResultSet": { "shape": "Boolean", "documentation": "A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set. The value is true if any substatement returns a result set.
" }, "Id": { "shape": "UUID", "documentation": "The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.
" }, "QueryParameters": { "shape": "SqlParametersList", "documentation": "The parameters for the SQL statement.
" }, "QueryString": { "shape": "StatementString", "documentation": "The SQL statement text.
" }, "RedshiftPid": { "shape": "Long", "documentation": "The process identifier from Amazon Redshift.
" }, "RedshiftQueryId": { "shape": "Long", "documentation": "The identifier of the query generated by Amazon Redshift. These identifiers are also available in the query
column of the STL_QUERY
system view.
Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A -1
indicates the value is null.
The size in bytes of the returned results. A -1
indicates the value is null.
The name or Amazon Resource Name (ARN) of the secret that enables access to the database.
" }, "SessionId": { "shape": "String", "documentation": "The session identifier of the query.
" }, "Status": { "shape": "StatusString", "documentation": "The status of the SQL statement being described. Status values are defined as follows:
ABORTED - The query run was stopped by the user.
ALL - A status value that includes all query statuses. This value can be used to filter results.
FAILED - The query run failed.
FINISHED - The query has finished running.
PICKED - The query has been chosen to be run.
STARTED - The query run has started.
SUBMITTED - The query was submitted, but not yet processed.
The SQL statements from a multiple statement run.
" }, "UpdatedAt": { "shape": "Timestamp", "documentation": "The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the status last changed.
" }, "WorkgroupName": { "shape": "WorkgroupNameString", "documentation": "The serverless workgroup name or Amazon Resource Name (ARN).
" } } }, "DescribeTableRequest": { "type": "structure", "required": [ "Database" ], "members": { "ClusterIdentifier": { "shape": "ClusterIdentifierString", "documentation": "The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
" }, "ConnectedDatabase": { "shape": "String", "documentation": "A database name. The connected database is specified when you connect with your authentication credentials.
" }, "Database": { "shape": "String", "documentation": "The name of the database that contains the tables to be described. If ConnectedDatabase
is not specified, this is also the database to connect to with your authentication credentials.
The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.
" }, "MaxResults": { "shape": "PageSize", "documentation": "The maximum number of tables to return in the response. If more tables exist than fit in one response, then NextToken
is returned to page through the results.
A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
" }, "Schema": { "shape": "String", "documentation": "The schema that contains the table. If no schema is specified, then matching tables for all schemas are returned.
" }, "SecretArn": { "shape": "SecretArn", "documentation": "The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.
" }, "Table": { "shape": "String", "documentation": "The table name. If no table is specified, then all tables for all matching schemas are returned. If no table and no schema is specified, then all tables for all schemas in the database are returned
" }, "WorkgroupName": { "shape": "WorkgroupNameString", "documentation": "The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
" } } }, "DescribeTableResponse": { "type": "structure", "members": { "ColumnList": { "shape": "ColumnList", "documentation": "A list of columns in the table.
" }, "NextToken": { "shape": "String", "documentation": "A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
" }, "TableName": { "shape": "String", "documentation": "The table name.
" } } }, "ExecuteStatementInput": { "type": "structure", "required": [ "Sql" ], "members": { "ClientToken": { "shape": "ClientToken", "documentation": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
", "idempotencyToken": true }, "ClusterIdentifier": { "shape": "ClusterIdentifierString", "documentation": "The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
" }, "Database": { "shape": "String", "documentation": "The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.
" }, "DbUser": { "shape": "String", "documentation": "The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.
" }, "Parameters": { "shape": "SqlParametersList", "documentation": "The parameters for the SQL statement.
" }, "SecretArn": { "shape": "SecretArn", "documentation": "The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.
" }, "SessionId": { "shape": "UUID", "documentation": "The session identifier of the query.
" }, "SessionKeepAliveSeconds": { "shape": "SessionAliveSeconds", "documentation": "The number of seconds to keep the session alive after the query finishes. The maximum time a session can keep alive is 24 hours. After 24 hours, the session is forced closed and the query is terminated.
" }, "Sql": { "shape": "StatementString", "documentation": "The SQL statement text to run.
" }, "StatementName": { "shape": "StatementNameString", "documentation": "The name of the SQL statement. You can name the SQL statement when you create it to identify the query.
" }, "WithEvent": { "shape": "Boolean", "documentation": "A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs.
" }, "WorkgroupName": { "shape": "WorkgroupNameString", "documentation": "The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
" } } }, "ExecuteStatementOutput": { "type": "structure", "members": { "ClusterIdentifier": { "shape": "ClusterIdentifierString", "documentation": "The cluster identifier. This element is not returned when connecting to a serverless workgroup.
" }, "CreatedAt": { "shape": "Timestamp", "documentation": "The date and time (UTC) the statement was created.
" }, "Database": { "shape": "String", "documentation": "The name of the database.
" }, "DbGroups": { "shape": "DbGroupList", "documentation": "A list of colon (:) separated names of database groups.
" }, "DbUser": { "shape": "String", "documentation": "The database user name.
" }, "Id": { "shape": "UUID", "documentation": "The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.
" }, "SecretArn": { "shape": "SecretArn", "documentation": "The name or ARN of the secret that enables access to the database.
" }, "SessionId": { "shape": "UUID", "documentation": "The session identifier of the query.
" }, "WorkgroupName": { "shape": "WorkgroupNameString", "documentation": "The serverless workgroup name or Amazon Resource Name (ARN). This element is not returned when connecting to a provisioned cluster.
" } } }, "Field": { "type": "structure", "members": { "blobValue": { "shape": "Blob", "documentation": "A value of the BLOB data type.
" }, "booleanValue": { "shape": "BoxedBoolean", "documentation": "A value of the Boolean data type.
" }, "doubleValue": { "shape": "BoxedDouble", "documentation": "A value of the double data type.
" }, "isNull": { "shape": "BoxedBoolean", "documentation": "A value that indicates whether the data is NULL.
" }, "longValue": { "shape": "BoxedLong", "documentation": "A value of the long data type.
" }, "stringValue": { "shape": "String", "documentation": "A value of the string data type.
" } }, "documentation": "A data value in a column.
", "union": true }, "FieldList": { "type": "list", "member": { "shape": "Field" } }, "GetStatementResultRequest": { "type": "structure", "required": [ "Id" ], "members": { "Id": { "shape": "UUID", "documentation": "The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates then number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2
has a suffix of :2
that indicates the second SQL statement of a batch query. This identifier is returned by BatchExecuteStatment
, ExecuteStatment
, and ListStatements
.
A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
" } } }, "GetStatementResultResponse": { "type": "structure", "required": [ "Records" ], "members": { "ColumnMetadata": { "shape": "ColumnMetadataList", "documentation": "The properties (metadata) of a column.
" }, "NextToken": { "shape": "String", "documentation": "A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
" }, "Records": { "shape": "SqlRecords", "documentation": "The results of the SQL statement.
" }, "TotalNumRows": { "shape": "Long", "documentation": "The total number of rows in the result set returned from a query. You can use this number to estimate the number of calls to the GetStatementResult
operation needed to page through the results.
The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
" }, "Database": { "shape": "String", "documentation": "The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.
" }, "DbUser": { "shape": "String", "documentation": "The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.
" }, "MaxResults": { "shape": "PageSize", "documentation": "The maximum number of databases to return in the response. If more databases exist than fit in one response, then NextToken
is returned to page through the results.
A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
" }, "SecretArn": { "shape": "SecretArn", "documentation": "The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.
" }, "WorkgroupName": { "shape": "WorkgroupNameString", "documentation": "The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
" } } }, "ListDatabasesResponse": { "type": "structure", "members": { "Databases": { "shape": "DatabaseList", "documentation": "The names of databases.
" }, "NextToken": { "shape": "String", "documentation": "A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
" } } }, "ListSchemasRequest": { "type": "structure", "required": [ "Database" ], "members": { "ClusterIdentifier": { "shape": "ClusterIdentifierString", "documentation": "The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
" }, "ConnectedDatabase": { "shape": "String", "documentation": "A database name. The connected database is specified when you connect with your authentication credentials.
" }, "Database": { "shape": "String", "documentation": "The name of the database that contains the schemas to list. If ConnectedDatabase
is not specified, this is also the database to connect to with your authentication credentials.
The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.
" }, "MaxResults": { "shape": "PageSize", "documentation": "The maximum number of schemas to return in the response. If more schemas exist than fit in one response, then NextToken
is returned to page through the results.
A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
" }, "SchemaPattern": { "shape": "String", "documentation": "A pattern to filter results by schema name. Within a schema pattern, \"%\" means match any substring of 0 or more characters and \"_\" means match any one character. Only schema name entries matching the search pattern are returned.
" }, "SecretArn": { "shape": "SecretArn", "documentation": "The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.
" }, "WorkgroupName": { "shape": "WorkgroupNameString", "documentation": "The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
" } } }, "ListSchemasResponse": { "type": "structure", "members": { "NextToken": { "shape": "String", "documentation": "A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
" }, "Schemas": { "shape": "SchemaList", "documentation": "The schemas that match the request pattern.
" } } }, "ListStatementsLimit": { "type": "integer", "max": 100, "min": 0 }, "ListStatementsRequest": { "type": "structure", "members": { "MaxResults": { "shape": "ListStatementsLimit", "documentation": "The maximum number of SQL statements to return in the response. If more SQL statements exist than fit in one response, then NextToken
is returned to page through the results.
A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
" }, "RoleLevel": { "shape": "Boolean", "documentation": "A value that filters which statements to return in the response. If true, all statements run by the caller's IAM role are returned. If false, only statements run by the caller's IAM role in the current IAM session are returned. The default is true.
" }, "StatementName": { "shape": "StatementNameString", "documentation": "The name of the SQL statement specified as input to BatchExecuteStatement
or ExecuteStatement
to identify the query. You can list multiple statements by providing a prefix that matches the beginning of the statement name. For example, to list myStatement1, myStatement2, myStatement3, and so on, then provide the a value of myStatement
. Data API does a case-sensitive match of SQL statement names to the prefix value you provide.
The status of the SQL statement to list. Status values are defined as follows:
ABORTED - The query run was stopped by the user.
ALL - A status value that includes all query statuses. This value can be used to filter results.
FAILED - The query run failed.
FINISHED - The query has finished running.
PICKED - The query has been chosen to be run.
STARTED - The query run has started.
SUBMITTED - The query was submitted, but not yet processed.
A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
" }, "Statements": { "shape": "StatementList", "documentation": "The SQL statements.
" } } }, "ListTablesRequest": { "type": "structure", "required": [ "Database" ], "members": { "ClusterIdentifier": { "shape": "ClusterIdentifierString", "documentation": "The cluster identifier. This parameter is required when connecting to a cluster and authenticating using either Secrets Manager or temporary credentials.
" }, "ConnectedDatabase": { "shape": "String", "documentation": "A database name. The connected database is specified when you connect with your authentication credentials.
" }, "Database": { "shape": "String", "documentation": "The name of the database that contains the tables to list. If ConnectedDatabase
is not specified, this is also the database to connect to with your authentication credentials.
The database user name. This parameter is required when connecting to a cluster as a database user and authenticating using temporary credentials.
" }, "MaxResults": { "shape": "PageSize", "documentation": "The maximum number of tables to return in the response. If more tables exist than fit in one response, then NextToken
is returned to page through the results.
A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
" }, "SchemaPattern": { "shape": "String", "documentation": "A pattern to filter results by schema name. Within a schema pattern, \"%\" means match any substring of 0 or more characters and \"_\" means match any one character. Only schema name entries matching the search pattern are returned. If SchemaPattern
is not specified, then all tables that match TablePattern
are returned. If neither SchemaPattern
or TablePattern
are specified, then all tables are returned.
The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.
" }, "TablePattern": { "shape": "String", "documentation": "A pattern to filter results by table name. Within a table pattern, \"%\" means match any substring of 0 or more characters and \"_\" means match any one character. Only table name entries matching the search pattern are returned. If TablePattern
is not specified, then all tables that match SchemaPattern
are returned. If neither SchemaPattern
or TablePattern
are specified, then all tables are returned.
The serverless workgroup name or Amazon Resource Name (ARN). This parameter is required when connecting to a serverless workgroup and authenticating using either Secrets Manager or temporary credentials.
" } } }, "ListTablesResponse": { "type": "structure", "members": { "NextToken": { "shape": "String", "documentation": "A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.
" }, "Tables": { "shape": "TableList", "documentation": "The tables that match the request pattern.
" } } }, "Long": { "type": "long" }, "PageSize": { "type": "integer", "max": 1000, "min": 0 }, "ParameterName": { "type": "string", "pattern": "^[0-9a-zA-Z_]+$" }, "ParameterValue": { "type": "string", "min": 1 }, "SchemaList": { "type": "list", "member": { "shape": "String" } }, "SecretArn": { "type": "string" }, "SessionAliveSeconds": { "type": "integer", "box": true, "max": 86400, "min": 0 }, "SqlList": { "type": "list", "member": { "shape": "StatementString" }, "max": 40, "min": 1 }, "SqlParameter": { "type": "structure", "required": [ "name", "value" ], "members": { "name": { "shape": "ParameterName", "documentation": "The name of the parameter.
" }, "value": { "shape": "ParameterValue", "documentation": "The value of the parameter. Amazon Redshift implicitly converts to the proper data type. For more information, see Data types in the Amazon Redshift Database Developer Guide.
" } }, "documentation": "A parameter used in a SQL statement.
" }, "SqlParametersList": { "type": "list", "member": { "shape": "SqlParameter" }, "min": 1 }, "SqlRecords": { "type": "list", "member": { "shape": "FieldList" } }, "StatementData": { "type": "structure", "required": [ "Id" ], "members": { "CreatedAt": { "shape": "Timestamp", "documentation": "The date and time (UTC) the statement was created.
" }, "Id": { "shape": "UUID", "documentation": "The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.
" }, "IsBatchStatement": { "shape": "Boolean", "documentation": "A value that indicates whether the statement is a batch query request.
" }, "QueryParameters": { "shape": "SqlParametersList", "documentation": "The parameters used in a SQL statement.
" }, "QueryString": { "shape": "StatementString", "documentation": "The SQL statement.
" }, "QueryStrings": { "shape": "StatementStringList", "documentation": "One or more SQL statements. Each query string in the array corresponds to one of the queries in a batch query request.
" }, "SecretArn": { "shape": "SecretArn", "documentation": "The name or Amazon Resource Name (ARN) of the secret that enables access to the database.
" }, "SessionId": { "shape": "UUID", "documentation": "The session identifier of the query.
" }, "StatementName": { "shape": "StatementNameString", "documentation": "The name of the SQL statement.
" }, "Status": { "shape": "StatusString", "documentation": "The status of the SQL statement. An example is the that the SQL statement finished.
" }, "UpdatedAt": { "shape": "Timestamp", "documentation": "The date and time (UTC) that the statement metadata was last updated.
" } }, "documentation": "The SQL statement to run.
" }, "StatementList": { "type": "list", "member": { "shape": "StatementData" } }, "StatementNameString": { "type": "string", "max": 500, "min": 0 }, "StatementStatusString": { "type": "string", "enum": [ "SUBMITTED", "PICKED", "STARTED", "FINISHED", "ABORTED", "FAILED" ] }, "StatementString": { "type": "string" }, "StatementStringList": { "type": "list", "member": { "shape": "StatementString" } }, "StatusString": { "type": "string", "enum": [ "SUBMITTED", "PICKED", "STARTED", "FINISHED", "ABORTED", "FAILED", "ALL" ] }, "String": { "type": "string" }, "SubStatementData": { "type": "structure", "required": [ "Id" ], "members": { "CreatedAt": { "shape": "Timestamp", "documentation": "The date and time (UTC) the statement was created.
" }, "Duration": { "shape": "Long", "documentation": "The amount of time in nanoseconds that the statement ran.
" }, "Error": { "shape": "String", "documentation": "The error message from the cluster if the SQL statement encountered an error while running.
" }, "HasResultSet": { "shape": "Boolean", "documentation": "A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set.
" }, "Id": { "shape": "UUID", "documentation": "The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2
has a suffix of :2
that indicates the second SQL statement of a batch query.
The SQL statement text.
" }, "RedshiftQueryId": { "shape": "Long", "documentation": "The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.
" }, "ResultRows": { "shape": "Long", "documentation": "Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A -1
indicates the value is null.
The size in bytes of the returned results. A -1
indicates the value is null.
The status of the SQL statement. An example is the that the SQL statement finished.
" }, "UpdatedAt": { "shape": "Timestamp", "documentation": "The date and time (UTC) that the statement metadata was last updated.
" } }, "documentation": "Information about an SQL statement.
" }, "SubStatementList": { "type": "list", "member": { "shape": "SubStatementData" } }, "TableList": { "type": "list", "member": { "shape": "TableMember" } }, "TableMember": { "type": "structure", "members": { "name": { "shape": "String", "documentation": "The name of the table.
" }, "schema": { "shape": "String", "documentation": "The schema containing the table.
" }, "type": { "shape": "String", "documentation": "The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM.
" } }, "documentation": "The properties of a table.
" }, "Timestamp": { "type": "timestamp" }, "UUID": { "type": "string", "pattern": "^[a-z0-9]{8}(-[a-z0-9]{4}){3}-[a-z0-9]{12}(:\\d+)?$" }, "WorkgroupNameString": { "type": "string", "max": 128, "min": 3, "pattern": "^(([a-z0-9-]+)|(arn:(aws(-[a-z]+)*):redshift-serverless:[a-z]{2}(-gov)?-[a-z]+-\\d{1}:\\d{12}:workgroup/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}))$" }, "bool": { "type": "boolean" } }, "documentation": "You can use the Amazon Redshift Data API to run queries on Amazon Redshift tables. You can run SQL statements, which are committed if the statement succeeds.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
" }