"documentation":"<p>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: </p> <ul> <li> <p>Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. </p> </li> <li> <p>Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the <code>redshift:GetClusterCredentials</code> operation is required to use this method. </p> </li> </ul>"
"documentation":"<p>Cancels a running query. To be canceled, a query must be running. </p>"
},
"DescribeStatement":{
"name":"DescribeStatement",
"http":{
"method":"POST",
"requestUri":"/"
},
"input":{"shape":"DescribeStatementRequest"},
"output":{"shape":"DescribeStatementResponse"},
"errors":[
{"shape":"ValidationException"},
{"shape":"ResourceNotFoundException"},
{"shape":"InternalServerException"}
],
"documentation":"<p>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. </p>"
"documentation":"<p>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: </p> <ul> <li> <p>Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. </p> </li> <li> <p>Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the <code>redshift:GetClusterCredentials</code> operation is required to use this method. </p> </li> </ul>"
"documentation":"<p>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: </p> <ul> <li> <p>Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. </p> </li> <li> <p>Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the <code>redshift:GetClusterCredentials</code> operation is required to use this method. </p> </li> </ul>"
"documentation":"<p>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: </p> <ul> <li> <p>Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. </p> </li> <li> <p>Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the <code>redshift:GetClusterCredentials</code> operation is required to use this method. </p> </li> </ul>"
"documentation":"<p>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: </p> <ul> <li> <p>Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. </p> </li> <li> <p>Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the <code>redshift:GetClusterCredentials</code> operation is required to use this method. </p> </li> </ul>"
"documentation":"<p>List of SQL statements. By default, only finished statements are shown. A token is returned to page through the statement list. </p>"
"documentation":"<p>List the tables in a database. If neither <code>SchemaPattern</code> nor <code>TablePattern</code> 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: </p> <ul> <li> <p>Secrets Manager - specify the Amazon Resource Name (ARN) of the secret, the database name, and the cluster identifier that matches the cluster in the secret. </p> </li> <li> <p>Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the <code>redshift:GetClusterCredentials</code> operation is required to use this method. </p> </li> </ul>"
"documentation":"<p>Statement identifier of the exception.</p>"
}
},
"documentation":"<p>An SQL statement encountered an environmental error while running.</p>",
"exception":true,
"fault":true
},
"BatchExecuteStatementInput":{
"type":"structure",
"required":[
"ClusterIdentifier",
"Database",
"Sqls"
],
"members":{
"ClusterIdentifier":{
"shape":"Location",
"documentation":"<p>The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials. </p>"
},
"Database":{
"shape":"String",
"documentation":"<p>The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials. </p>"
},
"DbUser":{
"shape":"String",
"documentation":"<p>The database user name. This parameter is required when authenticating using temporary credentials. </p>"
},
"SecretArn":{
"shape":"SecretArn",
"documentation":"<p>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager. </p>"
},
"Sqls":{
"shape":"SqlList",
"documentation":"<p>One or more SQL statements to run. </p>"
},
"StatementName":{
"shape":"StatementNameString",
"documentation":"<p>The name of the SQL statements. You can name the SQL statements when you create them to identify the query. </p>"
},
"WithEvent":{
"shape":"Boolean",
"documentation":"<p>A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run. </p>"
}
}
},
"BatchExecuteStatementOutput":{
"type":"structure",
"members":{
"ClusterIdentifier":{
"shape":"Location",
"documentation":"<p>The cluster identifier. </p>"
},
"CreatedAt":{
"shape":"Timestamp",
"documentation":"<p>The date and time (UTC) the statement was created. </p>"
},
"Database":{
"shape":"String",
"documentation":"<p>The name of the database.</p>"
},
"DbUser":{
"shape":"String",
"documentation":"<p>The database user name.</p>"
},
"Id":{
"shape":"StatementId",
"documentation":"<p>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 <code>BatchExecuteStatment</code>. </p>"
},
"SecretArn":{
"shape":"SecretArn",
"documentation":"<p>The name or ARN of the secret that enables access to the database. </p>"
"documentation":"<p>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 <code>BatchExecuteStatment</code>, <code>ExecuteStatment</code>, and <code>ListStatements</code>. </p>"
"documentation":"<p>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, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query. This identifier is returned by <code>BatchExecuteStatment</code>, <code>ExecuteStatement</code>, and <code>ListStatements</code>. </p>"
"documentation":"<p>The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>"
"documentation":"<p>The process identifier from Amazon Redshift. </p>"
},
"RedshiftQueryId":{
"shape":"Long",
"documentation":"<p>The identifier of the query generated by Amazon Redshift. These identifiers are also available in the <code>query</code> column of the <code>STL_QUERY</code> system view. </p>"
"documentation":"<p>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 <code>-1</code> indicates the value is null.</p>"
"documentation":"<p>The name or Amazon Resource Name (ARN) of the secret that enables access to the database. </p>"
},
"Status":{
"shape":"StatusString",
"documentation":"<p>The status of the SQL statement being described. Status values are defined as follows: </p> <ul> <li> <p>ABORTED - The query run was stopped by the user. </p> </li> <li> <p>ALL - A status value that includes all query statuses. This value can be used to filter results. </p> </li> <li> <p>FAILED - The query run failed. </p> </li> <li> <p>FINISHED - The query has finished running. </p> </li> <li> <p>PICKED - The query has been chosen to be run. </p> </li> <li> <p>STARTED - The query run has started. </p> </li> <li> <p>SUBMITTED - The query was submitted, but not yet processed. </p> </li> </ul>"
"documentation":"<p>The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the status last changed. </p>"
"documentation":"<p>The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials. </p>"
"documentation":"<p>The name of the database that contains the tables to be described. If <code>ConnectedDatabase</code> is not specified, this is also the database to connect to with your authentication credentials.</p>"
"documentation":"<p>The database user name. This parameter is required when authenticating using temporary credentials. </p>"
},
"MaxResults":{
"shape":"PageSize",
"documentation":"<p>The maximum number of tables to return in the response. If more tables exist than fit in one response, then <code>NextToken</code> is returned to page through the results. </p>"
},
"NextToken":{
"shape":"String",
"documentation":"<p>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. </p>"
},
"Schema":{
"shape":"String",
"documentation":"<p>The schema that contains the table. If no schema is specified, then matching tables for all schemas are returned. </p>"
"documentation":"<p>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager. </p>"
"documentation":"<p>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</p>"
}
}
},
"DescribeTableResponse":{
"type":"structure",
"members":{
"ColumnList":{
"shape":"ColumnList",
"documentation":"<p>A list of columns in the table. </p>"
},
"NextToken":{
"shape":"String",
"documentation":"<p>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. </p>"
},
"TableName":{
"shape":"String",
"documentation":"<p>The table name. </p>"
}
}
},
"ExecuteStatementException":{
"type":"structure",
"required":[
"Message",
"StatementId"
],
"members":{
"Message":{
"shape":"String",
"documentation":"<p>The exception message.</p>"
},
"StatementId":{
"shape":"String",
"documentation":"<p>Statement identifier of the exception.</p>"
}
},
"documentation":"<p>The SQL statement encountered an environmental error while running.</p>",
"documentation":"<p>The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials. </p>"
"documentation":"<p>The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials. </p>"
"documentation":"<p>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager. </p>"
"documentation":"<p>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. </p>"
"documentation":"<p>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, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query. This identifier is returned by <code>BatchExecuteStatment</code>, <code>ExecuteStatment</code>, and <code>ListStatements</code>. </p>"
"documentation":"<p>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. </p>"
}
}
},
"GetStatementResultResponse":{
"type":"structure",
"required":["Records"],
"members":{
"ColumnMetadata":{
"shape":"ColumnMetadataList",
"documentation":"<p>The properties (metadata) of a column. </p>"
},
"NextToken":{
"shape":"String",
"documentation":"<p>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. </p>"
},
"Records":{
"shape":"SqlRecords",
"documentation":"<p>The results of the SQL statement.</p>"
},
"TotalNumRows":{
"shape":"Long",
"documentation":"<p>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 <code>GetStatementResult</code> operation needed to page through the results. </p>"
}
}
},
"Integer":{"type":"integer"},
"InternalServerException":{
"type":"structure",
"required":["Message"],
"members":{
"Message":{
"shape":"String",
"documentation":"<p>The exception message.</p>"
}
},
"documentation":"<p>The Amazon Redshift Data API operation failed due to invalid input. </p>",
"documentation":"<p>The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials. </p>"
"documentation":"<p>The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials. </p>"
"documentation":"<p>The database user name. This parameter is required when authenticating using temporary credentials. </p>"
},
"MaxResults":{
"shape":"PageSize",
"documentation":"<p>The maximum number of databases to return in the response. If more databases exist than fit in one response, then <code>NextToken</code> is returned to page through the results. </p>"
},
"NextToken":{
"shape":"String",
"documentation":"<p>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. </p>"
"documentation":"<p>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager. </p>"
"documentation":"<p>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. </p>"
"documentation":"<p>The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials. </p>"
"documentation":"<p>The name of the database that contains the schemas to list. If <code>ConnectedDatabase</code> is not specified, this is also the database to connect to with your authentication credentials.</p>"
"documentation":"<p>The database user name. This parameter is required when authenticating using temporary credentials. </p>"
},
"MaxResults":{
"shape":"PageSize",
"documentation":"<p>The maximum number of schemas to return in the response. If more schemas exist than fit in one response, then <code>NextToken</code> is returned to page through the results. </p>"
},
"NextToken":{
"shape":"String",
"documentation":"<p>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. </p>"
},
"SchemaPattern":{
"shape":"String",
"documentation":"<p>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. </p>"
"documentation":"<p>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager. </p>"
"documentation":"<p>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. </p>"
},
"Schemas":{
"shape":"SchemaList",
"documentation":"<p>The schemas that match the request pattern. </p>"
}
}
},
"ListStatementsLimit":{
"type":"integer",
"max":100,
"min":0
},
"ListStatementsRequest":{
"type":"structure",
"members":{
"MaxResults":{
"shape":"ListStatementsLimit",
"documentation":"<p>The maximum number of SQL statements to return in the response. If more SQL statements exist than fit in one response, then <code>NextToken</code> is returned to page through the results. </p>"
},
"NextToken":{
"shape":"String",
"documentation":"<p>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. </p>"
"documentation":"<p>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. </p>"
"documentation":"<p>The name of the SQL statement specified as input to <code>BatchExecuteStatement</code> or <code>ExecuteStatement</code> 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 <code>myStatement</code>. Data API does a case-sensitive match of SQL statement names to the prefix value you provide. </p>"
"documentation":"<p>The status of the SQL statement to list. Status values are defined as follows: </p> <ul> <li> <p>ABORTED - The query run was stopped by the user. </p> </li> <li> <p>ALL - A status value that includes all query statuses. This value can be used to filter results. </p> </li> <li> <p>FAILED - The query run failed. </p> </li> <li> <p>FINISHED - The query has finished running. </p> </li> <li> <p>PICKED - The query has been chosen to be run. </p> </li> <li> <p>STARTED - The query run has started. </p> </li> <li> <p>SUBMITTED - The query was submitted, but not yet processed. </p> </li> </ul>"
}
}
},
"ListStatementsResponse":{
"type":"structure",
"required":["Statements"],
"members":{
"NextToken":{
"shape":"String",
"documentation":"<p>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. </p>"
"documentation":"<p>The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials. </p>"
"documentation":"<p>The name of the database that contains the tables to list. If <code>ConnectedDatabase</code> is not specified, this is also the database to connect to with your authentication credentials.</p>"
"documentation":"<p>The database user name. This parameter is required when authenticating using temporary credentials. </p>"
},
"MaxResults":{
"shape":"PageSize",
"documentation":"<p>The maximum number of tables to return in the response. If more tables exist than fit in one response, then <code>NextToken</code> is returned to page through the results. </p>"
},
"NextToken":{
"shape":"String",
"documentation":"<p>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. </p>"
},
"SchemaPattern":{
"shape":"String",
"documentation":"<p>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 <code>SchemaPattern</code> is not specified, then all tables that match <code>TablePattern</code> are returned. If neither <code>SchemaPattern</code> or <code>TablePattern</code> are specified, then all tables are returned. </p>"
"documentation":"<p>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager. </p>"
"documentation":"<p>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 <code>TablePattern</code> is not specified, then all tables that match <code>SchemaPattern</code>are returned. If neither <code>SchemaPattern</code> or <code>TablePattern</code> are specified, then all tables are returned. </p>"
}
}
},
"ListTablesResponse":{
"type":"structure",
"members":{
"NextToken":{
"shape":"String",
"documentation":"<p>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. </p>"
},
"Tables":{
"shape":"TableList",
"documentation":"<p>The tables that match the request pattern. </p>"
"documentation":"<p>The name of the parameter.</p>"
},
"value":{
"shape":"ParameterValue",
"documentation":"<p>The value of the parameter. Amazon Redshift implicitly converts to the proper data type. For more inforation, see <a href=\"https://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html\">Data types</a> in the <i>Amazon Redshift Database Developer Guide</i>. </p>"
}
},
"documentation":"<p>A parameter used in a SQL statement.</p>"
"documentation":"<p>The date and time (UTC) the statement was created. </p>"
},
"Duration":{
"shape":"Long",
"documentation":"<p>The amount of time in nanoseconds that the statement ran.</p>"
},
"Error":{
"shape":"String",
"documentation":"<p>The error message from the cluster if the SQL statement encountered an error while running.</p>"
},
"HasResultSet":{
"shape":"Boolean",
"documentation":"<p>A value that indicates whether the statement has a result set. The result set can be empty.</p>"
},
"Id":{
"shape":"StatementId",
"documentation":"<p>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, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query.</p>"
},
"QueryString":{
"shape":"StatementString",
"documentation":"<p>The SQL statement text.</p>"
},
"RedshiftQueryId":{
"shape":"Long",
"documentation":"<p>The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. </p>"
},
"ResultRows":{
"shape":"Long",
"documentation":"<p>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 <code>-1</code> indicates the value is null.</p>"
},
"ResultSize":{
"shape":"Long",
"documentation":"<p>The size in bytes of the returned results. A <code>-1</code> indicates the value is null.</p>"
},
"Status":{
"shape":"StatementStatusString",
"documentation":"<p>The status of the SQL statement. An example is the that the SQL statement finished. </p>"
},
"UpdatedAt":{
"shape":"Timestamp",
"documentation":"<p>The date and time (UTC) that the statement metadata was last updated.</p>"
}
},
"documentation":"<p>Information about an SQL statement.</p>"
"documentation":"<p>The schema containing the table. </p>"
},
"type":{
"shape":"String",
"documentation":"<p>The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM. </p>"
}
},
"documentation":"<p>The properties of a table. </p>"
},
"Timestamp":{"type":"timestamp"},
"ValidationException":{
"type":"structure",
"members":{
"Message":{
"shape":"String",
"documentation":"<p>The exception message.</p>"
}
},
"documentation":"<p>The Amazon Redshift Data API operation failed due to invalid input. </p>",
"documentation":"<p>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. </p> <p>For more information about the Amazon Redshift Data API, see <a href=\"https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html\">Using the Amazon Redshift Data API</a> in the <i>Amazon Redshift Cluster Management Guide</i>. </p>"