libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.RedshiftData.Lens

Description

 
Synopsis

Operations

ListStatements

listStatements_status :: Lens' ListStatements (Maybe StatusString) Source #

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.

listStatements_nextToken :: Lens' ListStatements (Maybe Text) Source #

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.

listStatements_statementName :: Lens' ListStatements (Maybe Text) Source #

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.

listStatements_roleLevel :: Lens' ListStatements (Maybe Bool) Source #

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.

listStatements_maxResults :: Lens' ListStatements (Maybe Natural) Source #

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.

listStatementsResponse_nextToken :: Lens' ListStatementsResponse (Maybe Text) Source #

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.

ListDatabases

listDatabases_dbUser :: Lens' ListDatabases (Maybe Text) Source #

The database user name. This parameter is required when authenticating using temporary credentials.

listDatabases_nextToken :: Lens' ListDatabases (Maybe Text) Source #

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.

listDatabases_secretArn :: Lens' ListDatabases (Maybe Text) Source #

The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

listDatabases_maxResults :: Lens' ListDatabases (Maybe Natural) Source #

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.

listDatabases_clusterIdentifier :: Lens' ListDatabases Text Source #

The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

listDatabases_database :: Lens' ListDatabases Text Source #

The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

listDatabasesResponse_nextToken :: Lens' ListDatabasesResponse (Maybe Text) Source #

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.

ListSchemas

listSchemas_dbUser :: Lens' ListSchemas (Maybe Text) Source #

The database user name. This parameter is required when authenticating using temporary credentials.

listSchemas_connectedDatabase :: Lens' ListSchemas (Maybe Text) Source #

A database name. The connected database is specified when you connect with your authentication credentials.

listSchemas_nextToken :: Lens' ListSchemas (Maybe Text) Source #

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.

listSchemas_secretArn :: Lens' ListSchemas (Maybe Text) Source #

The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

listSchemas_maxResults :: Lens' ListSchemas (Maybe Natural) Source #

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.

listSchemas_schemaPattern :: Lens' ListSchemas (Maybe Text) Source #

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.

listSchemas_clusterIdentifier :: Lens' ListSchemas Text Source #

The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

listSchemas_database :: Lens' ListSchemas Text Source #

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.

listSchemasResponse_schemas :: Lens' ListSchemasResponse (Maybe [Text]) Source #

The schemas that match the request pattern.

listSchemasResponse_nextToken :: Lens' ListSchemasResponse (Maybe Text) Source #

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.

DescribeStatement

describeStatement_id :: Lens' DescribeStatement Text Source #

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.

describeStatementResponse_status :: Lens' DescribeStatementResponse (Maybe StatusString) Source #

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.

describeStatementResponse_redshiftQueryId :: Lens' DescribeStatementResponse (Maybe Integer) Source #

The identifier of the query generated by Amazon Redshift. These identifiers are also available in the query column of the STL_QUERY system view.

describeStatementResponse_resultSize :: Lens' DescribeStatementResponse (Maybe Integer) Source #

The size in bytes of the returned results. A -1 indicates the value is null.

describeStatementResponse_createdAt :: Lens' DescribeStatementResponse (Maybe UTCTime) Source #

The date and time (UTC) when the SQL statement was submitted to run.

describeStatementResponse_error :: Lens' DescribeStatementResponse (Maybe Text) Source #

The error message from the cluster if the SQL statement encountered an error while running.

describeStatementResponse_resultRows :: Lens' DescribeStatementResponse (Maybe Integer) Source #

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.

describeStatementResponse_hasResultSet :: Lens' DescribeStatementResponse (Maybe Bool) Source #

A value that indicates whether the statement has a result set. The result set can be empty.

describeStatementResponse_updatedAt :: Lens' DescribeStatementResponse (Maybe UTCTime) Source #

The date and time (UTC) that the metadata for the SQL statement was last updated. An example is the time the status last changed.

describeStatementResponse_secretArn :: Lens' DescribeStatementResponse (Maybe Text) Source #

The name or Amazon Resource Name (ARN) of the secret that enables access to the database.

describeStatementResponse_duration :: Lens' DescribeStatementResponse (Maybe Integer) Source #

The amount of time in nanoseconds that the statement ran.

describeStatementResponse_id :: Lens' DescribeStatementResponse Text Source #

The identifier of the SQL statement described. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.

CancelStatement

cancelStatement_id :: Lens' CancelStatement Text Source #

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.

cancelStatementResponse_status :: Lens' CancelStatementResponse (Maybe Bool) Source #

A value that indicates whether the cancel statement succeeded (true).

DescribeTable

describeTable_dbUser :: Lens' DescribeTable (Maybe Text) Source #

The database user name. This parameter is required when authenticating using temporary credentials.

describeTable_connectedDatabase :: Lens' DescribeTable (Maybe Text) Source #

A database name. The connected database is specified when you connect with your authentication credentials.

describeTable_schema :: Lens' DescribeTable (Maybe Text) Source #

The schema that contains the table. If no schema is specified, then matching tables for all schemas are returned.

describeTable_nextToken :: Lens' DescribeTable (Maybe Text) Source #

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.

describeTable_secretArn :: Lens' DescribeTable (Maybe Text) Source #

The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

describeTable_table :: Lens' DescribeTable (Maybe Text) Source #

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

describeTable_maxResults :: Lens' DescribeTable (Maybe Natural) Source #

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.

describeTable_clusterIdentifier :: Lens' DescribeTable Text Source #

The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

describeTable_database :: Lens' DescribeTable Text Source #

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.

describeTableResponse_nextToken :: Lens' DescribeTableResponse (Maybe Text) Source #

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.

BatchExecuteStatement

batchExecuteStatement_dbUser :: Lens' BatchExecuteStatement (Maybe Text) Source #

The database user name. This parameter is required when authenticating using temporary credentials.

batchExecuteStatement_statementName :: Lens' BatchExecuteStatement (Maybe Text) Source #

The name of the SQL statements. You can name the SQL statements when you create them to identify the query.

batchExecuteStatement_secretArn :: Lens' BatchExecuteStatement (Maybe Text) Source #

The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

batchExecuteStatement_withEvent :: Lens' BatchExecuteStatement (Maybe Bool) Source #

A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statements run.

batchExecuteStatement_clusterIdentifier :: Lens' BatchExecuteStatement Text Source #

The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

batchExecuteStatement_database :: Lens' BatchExecuteStatement Text Source #

The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

batchExecuteStatementResponse_id :: Lens' BatchExecuteStatementResponse (Maybe Text) Source #

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.

batchExecuteStatementResponse_secretArn :: Lens' BatchExecuteStatementResponse (Maybe Text) Source #

The name or ARN of the secret that enables access to the database.

ListTables

listTables_dbUser :: Lens' ListTables (Maybe Text) Source #

The database user name. This parameter is required when authenticating using temporary credentials.

listTables_connectedDatabase :: Lens' ListTables (Maybe Text) Source #

A database name. The connected database is specified when you connect with your authentication credentials.

listTables_nextToken :: Lens' ListTables (Maybe Text) Source #

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.

listTables_secretArn :: Lens' ListTables (Maybe Text) Source #

The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

listTables_tablePattern :: Lens' ListTables (Maybe Text) Source #

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 SchemaPatternare returned. If neither SchemaPattern or TablePattern are specified, then all tables are returned.

listTables_maxResults :: Lens' ListTables (Maybe Natural) Source #

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.

listTables_schemaPattern :: Lens' ListTables (Maybe Text) Source #

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.

listTables_clusterIdentifier :: Lens' ListTables Text Source #

The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

listTables_database :: Lens' ListTables Text Source #

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.

listTablesResponse_nextToken :: Lens' ListTablesResponse (Maybe Text) Source #

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.

listTablesResponse_tables :: Lens' ListTablesResponse (Maybe [TableMember]) Source #

The tables that match the request pattern.

ExecuteStatement

executeStatement_dbUser :: Lens' ExecuteStatement (Maybe Text) Source #

The database user name. This parameter is required when authenticating using temporary credentials.

executeStatement_statementName :: Lens' ExecuteStatement (Maybe Text) Source #

The name of the SQL statement. You can name the SQL statement when you create it to identify the query.

executeStatement_secretArn :: Lens' ExecuteStatement (Maybe Text) Source #

The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using Secrets Manager.

executeStatement_withEvent :: Lens' ExecuteStatement (Maybe Bool) Source #

A value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs.

executeStatement_clusterIdentifier :: Lens' ExecuteStatement Text Source #

The cluster identifier. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

executeStatement_database :: Lens' ExecuteStatement Text Source #

The name of the database. This parameter is required when authenticating using either Secrets Manager or temporary credentials.

executeStatement_sql :: Lens' ExecuteStatement Text Source #

The SQL statement text to run.

executeStatementResponse_createdAt :: Lens' ExecuteStatementResponse (Maybe UTCTime) Source #

The date and time (UTC) the statement was created.

executeStatementResponse_id :: Lens' ExecuteStatementResponse (Maybe Text) Source #

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.

executeStatementResponse_secretArn :: Lens' ExecuteStatementResponse (Maybe Text) Source #

The name or ARN of the secret that enables access to the database.

GetStatementResult

getStatementResult_nextToken :: Lens' GetStatementResult (Maybe Text) Source #

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.

getStatementResult_id :: Lens' GetStatementResult Text Source #

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.

getStatementResultResponse_totalNumRows :: Lens' GetStatementResultResponse (Maybe Integer) Source #

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.

getStatementResultResponse_nextToken :: Lens' GetStatementResultResponse (Maybe Text) Source #

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.

Types

ColumnMetadata

columnMetadata_typeName :: Lens' ColumnMetadata (Maybe Text) Source #

The database-specific data type of the column.

columnMetadata_isCaseSensitive :: Lens' ColumnMetadata (Maybe Bool) Source #

A value that indicates whether the column is case-sensitive.

columnMetadata_columnDefault :: Lens' ColumnMetadata (Maybe Text) Source #

The default value of the column.

columnMetadata_isCurrency :: Lens' ColumnMetadata (Maybe Bool) Source #

A value that indicates whether the column contains currency values.

columnMetadata_scale :: Lens' ColumnMetadata (Maybe Int) Source #

The scale value of a decimal number column.

columnMetadata_precision :: Lens' ColumnMetadata (Maybe Int) Source #

The precision value of a decimal number column.

columnMetadata_schemaName :: Lens' ColumnMetadata (Maybe Text) Source #

The name of the schema that contains the table that includes the column.

columnMetadata_isSigned :: Lens' ColumnMetadata (Maybe Bool) Source #

A value that indicates whether an integer column is signed.

columnMetadata_nullable :: Lens' ColumnMetadata (Maybe Int) Source #

A value that indicates whether the column is nullable.

columnMetadata_tableName :: Lens' ColumnMetadata (Maybe Text) Source #

The name of the table that includes the column.

Field

field_doubleValue :: Lens' Field (Maybe Double) Source #

A value of the double data type.

field_stringValue :: Lens' Field (Maybe Text) Source #

A value of the string data type.

field_longValue :: Lens' Field (Maybe Integer) Source #

A value of the long data type.

field_booleanValue :: Lens' Field (Maybe Bool) Source #

A value of the Boolean data type.

field_blobValue :: Lens' Field (Maybe ByteString) Source #

A value of the BLOB data type.-- -- Note: This Lens automatically encodes and decodes Base64 data. -- The underlying isomorphism will encode to Base64 representation during -- serialisation, and decode from Base64 representation during deserialisation. -- This Lens accepts and returns only raw unencoded data.

field_isNull :: Lens' Field (Maybe Bool) Source #

A value that indicates whether the data is NULL.

SqlParameter

sqlParameter_name :: Lens' SqlParameter Text Source #

The name of the parameter.

sqlParameter_value :: Lens' SqlParameter Text Source #

The value of the parameter. Amazon Redshift implicitly converts to the proper data type. For more inforation, see Data types in the Amazon Redshift Database Developer Guide.

StatementData

statementData_status :: Lens' StatementData (Maybe StatusString) Source #

The status of the SQL statement. An example is the that the SQL statement finished.

statementData_createdAt :: Lens' StatementData (Maybe UTCTime) Source #

The date and time (UTC) the statement was created.

statementData_queryParameters :: Lens' StatementData (Maybe (NonEmpty SqlParameter)) Source #

The parameters used in a SQL statement.

statementData_queryStrings :: Lens' StatementData (Maybe [Text]) Source #

One or more SQL statements. Each query string in the array corresponds to one of the queries in a batch query request.

statementData_statementName :: Lens' StatementData (Maybe Text) Source #

The name of the SQL statement.

statementData_updatedAt :: Lens' StatementData (Maybe UTCTime) Source #

The date and time (UTC) that the statement metadata was last updated.

statementData_secretArn :: Lens' StatementData (Maybe Text) Source #

The name or Amazon Resource Name (ARN) of the secret that enables access to the database.

statementData_isBatchStatement :: Lens' StatementData (Maybe Bool) Source #

A value that indicates whether the statement is a batch query request.

statementData_id :: Lens' StatementData Text Source #

The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.

SubStatementData

subStatementData_status :: Lens' SubStatementData (Maybe StatementStatusString) Source #

The status of the SQL statement. An example is the that the SQL statement finished.

subStatementData_redshiftQueryId :: Lens' SubStatementData (Maybe Integer) Source #

The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.

subStatementData_resultSize :: Lens' SubStatementData (Maybe Integer) Source #

The size in bytes of the returned results. A -1 indicates the value is null.

subStatementData_createdAt :: Lens' SubStatementData (Maybe UTCTime) Source #

The date and time (UTC) the statement was created.

subStatementData_error :: Lens' SubStatementData (Maybe Text) Source #

The error message from the cluster if the SQL statement encountered an error while running.

subStatementData_resultRows :: Lens' SubStatementData (Maybe Integer) Source #

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.

subStatementData_hasResultSet :: Lens' SubStatementData (Maybe Bool) Source #

A value that indicates whether the statement has a result set. The result set can be empty.

subStatementData_updatedAt :: Lens' SubStatementData (Maybe UTCTime) Source #

The date and time (UTC) that the statement metadata was last updated.

subStatementData_duration :: Lens' SubStatementData (Maybe Integer) Source #

The amount of time in nanoseconds that the statement ran.

subStatementData_id :: Lens' SubStatementData Text Source #

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.

TableMember

tableMember_schema :: Lens' TableMember (Maybe Text) Source #

The schema containing the table.

tableMember_name :: Lens' TableMember (Maybe Text) Source #

The name of the table.

tableMember_type :: Lens' TableMember (Maybe Text) Source #

The type of the table. Possible values include TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM.