Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Derived from API version 2019-12-20
of the AWS service descriptions, licensed under Apache 2.0.
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, see Using the Amazon Redshift Data API in the Amazon Redshift Cluster Management Guide.
Synopsis
- defaultService :: Service
- _ValidationException :: AsError a => Getting (First ServiceError) a ServiceError
- _ExecuteStatementException :: AsError a => Getting (First ServiceError) a ServiceError
- _InternalServerException :: AsError a => Getting (First ServiceError) a ServiceError
- _ActiveStatementsExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- _ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
- _BatchExecuteStatementException :: AsError a => Getting (First ServiceError) a ServiceError
- data ListStatements = ListStatements' (Maybe StatusString) (Maybe Text) (Maybe Text) (Maybe Bool) (Maybe Natural)
- newListStatements :: ListStatements
- data ListStatementsResponse = ListStatementsResponse' (Maybe Text) Int [StatementData]
- newListStatementsResponse :: Int -> ListStatementsResponse
- data ListDatabases = ListDatabases' (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Natural) Text Text
- newListDatabases :: Text -> Text -> ListDatabases
- data ListDatabasesResponse = ListDatabasesResponse' (Maybe Text) (Maybe [Text]) Int
- newListDatabasesResponse :: Int -> ListDatabasesResponse
- data ListSchemas = ListSchemas' (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Natural) (Maybe Text) Text Text
- newListSchemas :: Text -> Text -> ListSchemas
- data ListSchemasResponse = ListSchemasResponse' (Maybe [Text]) (Maybe Text) Int
- newListSchemasResponse :: Int -> ListSchemasResponse
- data DescribeStatement = DescribeStatement' Text
- newDescribeStatement :: Text -> DescribeStatement
- data DescribeStatementResponse = DescribeStatementResponse' (Maybe StatusString) (Maybe Integer) (Maybe Integer) (Maybe Text) (Maybe [SubStatementData]) (Maybe Text) (Maybe POSIX) (Maybe (NonEmpty SqlParameter)) (Maybe Text) (Maybe Integer) (Maybe Integer) (Maybe Text) (Maybe Bool) (Maybe Text) (Maybe POSIX) (Maybe Text) (Maybe Integer) Int Text
- newDescribeStatementResponse :: Int -> Text -> DescribeStatementResponse
- data CancelStatement = CancelStatement' Text
- newCancelStatement :: Text -> CancelStatement
- data CancelStatementResponse = CancelStatementResponse' (Maybe Bool) Int
- newCancelStatementResponse :: Int -> CancelStatementResponse
- data DescribeTable = DescribeTable' (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Natural) Text Text
- newDescribeTable :: Text -> Text -> DescribeTable
- data DescribeTableResponse = DescribeTableResponse' (Maybe [ColumnMetadata]) (Maybe Text) (Maybe Text) Int
- newDescribeTableResponse :: Int -> DescribeTableResponse
- data BatchExecuteStatement = BatchExecuteStatement' (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Bool) Text Text (NonEmpty Text)
- newBatchExecuteStatement :: Text -> Text -> NonEmpty Text -> BatchExecuteStatement
- data BatchExecuteStatementResponse = BatchExecuteStatementResponse' (Maybe Text) (Maybe Text) (Maybe POSIX) (Maybe Text) (Maybe Text) (Maybe Text) Int
- newBatchExecuteStatementResponse :: Int -> BatchExecuteStatementResponse
- data ListTables = ListTables' (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Natural) (Maybe Text) Text Text
- newListTables :: Text -> Text -> ListTables
- data ListTablesResponse = ListTablesResponse' (Maybe Text) (Maybe [TableMember]) Int
- newListTablesResponse :: Int -> ListTablesResponse
- data ExecuteStatement = ExecuteStatement' (Maybe Text) (Maybe Text) (Maybe (NonEmpty SqlParameter)) (Maybe Text) (Maybe Bool) Text Text Text
- newExecuteStatement :: Text -> Text -> Text -> ExecuteStatement
- data ExecuteStatementResponse = ExecuteStatementResponse' (Maybe Text) (Maybe Text) (Maybe POSIX) (Maybe Text) (Maybe Text) (Maybe Text) Int
- newExecuteStatementResponse :: Int -> ExecuteStatementResponse
- data GetStatementResult = GetStatementResult' (Maybe Text) Text
- newGetStatementResult :: Text -> GetStatementResult
- data GetStatementResultResponse = GetStatementResultResponse' (Maybe Integer) (Maybe Text) (Maybe [ColumnMetadata]) Int [[Field]]
- newGetStatementResultResponse :: Int -> GetStatementResultResponse
- newtype StatementStatusString where
- StatementStatusString' { }
- pattern StatementStatusString_ABORTED :: StatementStatusString
- pattern StatementStatusString_FAILED :: StatementStatusString
- pattern StatementStatusString_FINISHED :: StatementStatusString
- pattern StatementStatusString_PICKED :: StatementStatusString
- pattern StatementStatusString_STARTED :: StatementStatusString
- pattern StatementStatusString_SUBMITTED :: StatementStatusString
- newtype StatusString where
- StatusString' { }
- pattern StatusString_ABORTED :: StatusString
- pattern StatusString_ALL :: StatusString
- pattern StatusString_FAILED :: StatusString
- pattern StatusString_FINISHED :: StatusString
- pattern StatusString_PICKED :: StatusString
- pattern StatusString_STARTED :: StatusString
- pattern StatusString_SUBMITTED :: StatusString
- data ColumnMetadata = ColumnMetadata' (Maybe Int) (Maybe Text) (Maybe Bool) (Maybe Text) (Maybe Bool) (Maybe Int) (Maybe Int) (Maybe Text) (Maybe Text) (Maybe Bool) (Maybe Text) (Maybe Int) (Maybe Text)
- newColumnMetadata :: ColumnMetadata
- data Field = Field' (Maybe Double) (Maybe Text) (Maybe Integer) (Maybe Bool) (Maybe Base64) (Maybe Bool)
- newField :: Field
- data SqlParameter = SqlParameter' Text Text
- newSqlParameter :: Text -> Text -> SqlParameter
- data StatementData = StatementData' (Maybe StatusString) (Maybe POSIX) (Maybe (NonEmpty SqlParameter)) (Maybe [Text]) (Maybe Text) (Maybe Text) (Maybe POSIX) (Maybe Text) (Maybe Bool) Text
- newStatementData :: Text -> StatementData
- data SubStatementData = SubStatementData' (Maybe StatementStatusString) (Maybe Integer) (Maybe Integer) (Maybe POSIX) (Maybe Text) (Maybe Integer) (Maybe Bool) (Maybe Text) (Maybe POSIX) (Maybe Integer) Text
- newSubStatementData :: Text -> SubStatementData
- data TableMember = TableMember' (Maybe Text) (Maybe Text) (Maybe Text)
- newTableMember :: TableMember
Service Configuration
defaultService :: Service Source #
API version 2019-12-20
of the Amazon Redshift Data API Service SDK configuration.
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by RedshiftData
.
ValidationException
_ValidationException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The Amazon Redshift Data API operation failed due to invalid input.
ExecuteStatementException
_ExecuteStatementException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The SQL statement encountered an environmental error while running.
InternalServerException
_InternalServerException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The Amazon Redshift Data API operation failed due to invalid input.
ActiveStatementsExceededException
_ActiveStatementsExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The number of active statements exceeds the limit.
ResourceNotFoundException
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The Amazon Redshift Data API operation failed due to a missing resource.
BatchExecuteStatementException
_BatchExecuteStatementException :: AsError a => Getting (First ServiceError) a ServiceError Source #
An SQL statement encountered an environmental error while running.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
ListStatements (Paginated)
data ListStatements Source #
See: newListStatements
smart constructor.
Instances
newListStatements :: ListStatements Source #
Create a value of ListStatements
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:status:ListStatements'
, listStatements_status
- 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.
$sel:nextToken:ListStatements'
, listStatements_nextToken
- 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.
$sel:statementName:ListStatements'
, listStatements_statementName
- 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.
$sel:roleLevel:ListStatements'
, listStatements_roleLevel
- 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.
$sel:maxResults:ListStatements'
, listStatements_maxResults
- 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.
data ListStatementsResponse Source #
See: newListStatementsResponse
smart constructor.
Instances
newListStatementsResponse Source #
Create a value of ListStatementsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:nextToken:ListStatements'
, listStatementsResponse_nextToken
- 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.
$sel:httpStatus:ListStatementsResponse'
, listStatementsResponse_httpStatus
- The response's http status code.
$sel:statements:ListStatementsResponse'
, listStatementsResponse_statements
- The SQL statements.
ListDatabases (Paginated)
data ListDatabases Source #
See: newListDatabases
smart constructor.
Instances
Create a value of ListDatabases
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dbUser:ListDatabases'
, listDatabases_dbUser
- The database user name. This parameter is required when authenticating
using temporary credentials.
$sel:nextToken:ListDatabases'
, listDatabases_nextToken
- 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.
$sel:secretArn:ListDatabases'
, listDatabases_secretArn
- The name or ARN of the secret that enables access to the database. This
parameter is required when authenticating using Secrets Manager.
$sel:maxResults:ListDatabases'
, listDatabases_maxResults
- 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.
$sel:clusterIdentifier:ListDatabases'
, listDatabases_clusterIdentifier
- The cluster identifier. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
$sel:database:ListDatabases'
, listDatabases_database
- The name of the database. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
data ListDatabasesResponse Source #
See: newListDatabasesResponse
smart constructor.
Instances
newListDatabasesResponse Source #
Create a value of ListDatabasesResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:nextToken:ListDatabases'
, listDatabasesResponse_nextToken
- 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.
$sel:databases:ListDatabasesResponse'
, listDatabasesResponse_databases
- The names of databases.
$sel:httpStatus:ListDatabasesResponse'
, listDatabasesResponse_httpStatus
- The response's http status code.
ListSchemas (Paginated)
data ListSchemas Source #
See: newListSchemas
smart constructor.
ListSchemas' (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Natural) (Maybe Text) Text Text |
Instances
Create a value of ListSchemas
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dbUser:ListSchemas'
, listSchemas_dbUser
- The database user name. This parameter is required when authenticating
using temporary credentials.
$sel:connectedDatabase:ListSchemas'
, listSchemas_connectedDatabase
- A database name. The connected database is specified when you connect
with your authentication credentials.
$sel:nextToken:ListSchemas'
, listSchemas_nextToken
- 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.
$sel:secretArn:ListSchemas'
, listSchemas_secretArn
- The name or ARN of the secret that enables access to the database. This
parameter is required when authenticating using Secrets Manager.
$sel:maxResults:ListSchemas'
, listSchemas_maxResults
- 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.
$sel:schemaPattern:ListSchemas'
, listSchemas_schemaPattern
- 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.
$sel:clusterIdentifier:ListSchemas'
, listSchemas_clusterIdentifier
- The cluster identifier. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
$sel:database:ListSchemas'
, listSchemas_database
- 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.
data ListSchemasResponse Source #
See: newListSchemasResponse
smart constructor.
Instances
newListSchemasResponse Source #
Create a value of ListSchemasResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:schemas:ListSchemasResponse'
, listSchemasResponse_schemas
- The schemas that match the request pattern.
$sel:nextToken:ListSchemas'
, listSchemasResponse_nextToken
- 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.
$sel:httpStatus:ListSchemasResponse'
, listSchemasResponse_httpStatus
- The response's http status code.
DescribeStatement
data DescribeStatement Source #
See: newDescribeStatement
smart constructor.
Instances
Create a value of DescribeStatement
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:id:DescribeStatement'
, describeStatement_id
- 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
.
data DescribeStatementResponse Source #
See: newDescribeStatementResponse
smart constructor.
DescribeStatementResponse' (Maybe StatusString) (Maybe Integer) (Maybe Integer) (Maybe Text) (Maybe [SubStatementData]) (Maybe Text) (Maybe POSIX) (Maybe (NonEmpty SqlParameter)) (Maybe Text) (Maybe Integer) (Maybe Integer) (Maybe Text) (Maybe Bool) (Maybe Text) (Maybe POSIX) (Maybe Text) (Maybe Integer) Int Text |
Instances
newDescribeStatementResponse Source #
:: Int | |
-> Text | |
-> DescribeStatementResponse |
Create a value of DescribeStatementResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:status:DescribeStatementResponse'
, describeStatementResponse_status
- 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.
$sel:redshiftQueryId:DescribeStatementResponse'
, describeStatementResponse_redshiftQueryId
- The identifier of the query generated by Amazon Redshift. These
identifiers are also available in the query
column of the STL_QUERY
system view.
$sel:resultSize:DescribeStatementResponse'
, describeStatementResponse_resultSize
- The size in bytes of the returned results. A -1
indicates the value is
null.
$sel:dbUser:DescribeStatementResponse'
, describeStatementResponse_dbUser
- The database user name.
$sel:subStatements:DescribeStatementResponse'
, describeStatementResponse_subStatements
- The SQL statements from a multiple statement run.
$sel:database:DescribeStatementResponse'
, describeStatementResponse_database
- The name of the database.
$sel:createdAt:DescribeStatementResponse'
, describeStatementResponse_createdAt
- The date and time (UTC) when the SQL statement was submitted to run.
$sel:queryParameters:DescribeStatementResponse'
, describeStatementResponse_queryParameters
- The parameters for the SQL statement.
$sel:error:DescribeStatementResponse'
, describeStatementResponse_error
- The error message from the cluster if the SQL statement encountered an
error while running.
$sel:resultRows:DescribeStatementResponse'
, describeStatementResponse_resultRows
- 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.
$sel:redshiftPid:DescribeStatementResponse'
, describeStatementResponse_redshiftPid
- The process identifier from Amazon Redshift.
$sel:clusterIdentifier:DescribeStatementResponse'
, describeStatementResponse_clusterIdentifier
- The cluster identifier.
$sel:hasResultSet:DescribeStatementResponse'
, describeStatementResponse_hasResultSet
- A value that indicates whether the statement has a result set. The
result set can be empty.
$sel:queryString:DescribeStatementResponse'
, describeStatementResponse_queryString
- The SQL statement text.
$sel:updatedAt:DescribeStatementResponse'
, describeStatementResponse_updatedAt
- The date and time (UTC) that the metadata for the SQL statement was last
updated. An example is the time the status last changed.
$sel:secretArn:DescribeStatementResponse'
, describeStatementResponse_secretArn
- The name or Amazon Resource Name (ARN) of the secret that enables access
to the database.
$sel:duration:DescribeStatementResponse'
, describeStatementResponse_duration
- The amount of time in nanoseconds that the statement ran.
$sel:httpStatus:DescribeStatementResponse'
, describeStatementResponse_httpStatus
- The response's http status code.
$sel:id:DescribeStatement'
, describeStatementResponse_id
- The identifier of the SQL statement described. This value is a
universally unique identifier (UUID) generated by Amazon Redshift Data
API.
CancelStatement
data CancelStatement Source #
See: newCancelStatement
smart constructor.
Instances
Create a value of CancelStatement
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:id:CancelStatement'
, cancelStatement_id
- 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
.
data CancelStatementResponse Source #
See: newCancelStatementResponse
smart constructor.
Instances
newCancelStatementResponse Source #
Create a value of CancelStatementResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:status:CancelStatementResponse'
, cancelStatementResponse_status
- A value that indicates whether the cancel statement succeeded (true).
$sel:httpStatus:CancelStatementResponse'
, cancelStatementResponse_httpStatus
- The response's http status code.
DescribeTable (Paginated)
data DescribeTable Source #
See: newDescribeTable
smart constructor.
DescribeTable' (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Natural) Text Text |
Instances
Create a value of DescribeTable
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dbUser:DescribeTable'
, describeTable_dbUser
- The database user name. This parameter is required when authenticating
using temporary credentials.
$sel:connectedDatabase:DescribeTable'
, describeTable_connectedDatabase
- A database name. The connected database is specified when you connect
with your authentication credentials.
$sel:schema:DescribeTable'
, describeTable_schema
- The schema that contains the table. If no schema is specified, then
matching tables for all schemas are returned.
$sel:nextToken:DescribeTable'
, describeTable_nextToken
- 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.
$sel:secretArn:DescribeTable'
, describeTable_secretArn
- The name or ARN of the secret that enables access to the database. This
parameter is required when authenticating using Secrets Manager.
$sel:table:DescribeTable'
, describeTable_table
- 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
$sel:maxResults:DescribeTable'
, describeTable_maxResults
- 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.
$sel:clusterIdentifier:DescribeTable'
, describeTable_clusterIdentifier
- The cluster identifier. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
$sel:database:DescribeTable'
, describeTable_database
- 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.
data DescribeTableResponse Source #
See: newDescribeTableResponse
smart constructor.
Instances
newDescribeTableResponse Source #
Create a value of DescribeTableResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:columnList:DescribeTableResponse'
, describeTableResponse_columnList
- A list of columns in the table.
$sel:nextToken:DescribeTable'
, describeTableResponse_nextToken
- 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.
$sel:tableName:DescribeTableResponse'
, describeTableResponse_tableName
- The table name.
$sel:httpStatus:DescribeTableResponse'
, describeTableResponse_httpStatus
- The response's http status code.
BatchExecuteStatement
data BatchExecuteStatement Source #
See: newBatchExecuteStatement
smart constructor.
BatchExecuteStatement' (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Bool) Text Text (NonEmpty Text) |
Instances
newBatchExecuteStatement Source #
:: Text | |
-> Text | |
-> NonEmpty Text | |
-> BatchExecuteStatement |
Create a value of BatchExecuteStatement
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dbUser:BatchExecuteStatement'
, batchExecuteStatement_dbUser
- The database user name. This parameter is required when authenticating
using temporary credentials.
$sel:statementName:BatchExecuteStatement'
, batchExecuteStatement_statementName
- The name of the SQL statements. You can name the SQL statements when you
create them to identify the query.
$sel:secretArn:BatchExecuteStatement'
, batchExecuteStatement_secretArn
- The name or ARN of the secret that enables access to the database. This
parameter is required when authenticating using Secrets Manager.
$sel:withEvent:BatchExecuteStatement'
, batchExecuteStatement_withEvent
- A value that indicates whether to send an event to the Amazon
EventBridge event bus after the SQL statements run.
$sel:clusterIdentifier:BatchExecuteStatement'
, batchExecuteStatement_clusterIdentifier
- The cluster identifier. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
$sel:database:BatchExecuteStatement'
, batchExecuteStatement_database
- The name of the database. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
$sel:sqls:BatchExecuteStatement'
, batchExecuteStatement_sqls
- One or more SQL statements to run.
data BatchExecuteStatementResponse Source #
See: newBatchExecuteStatementResponse
smart constructor.
BatchExecuteStatementResponse' (Maybe Text) (Maybe Text) (Maybe POSIX) (Maybe Text) (Maybe Text) (Maybe Text) Int |
Instances
newBatchExecuteStatementResponse Source #
Create a value of BatchExecuteStatementResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dbUser:BatchExecuteStatement'
, batchExecuteStatementResponse_dbUser
- The database user name.
$sel:database:BatchExecuteStatement'
, batchExecuteStatementResponse_database
- The name of the database.
$sel:createdAt:BatchExecuteStatementResponse'
, batchExecuteStatementResponse_createdAt
- The date and time (UTC) the statement was created.
$sel:clusterIdentifier:BatchExecuteStatement'
, batchExecuteStatementResponse_clusterIdentifier
- The cluster identifier.
$sel:id:BatchExecuteStatementResponse'
, batchExecuteStatementResponse_id
- 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
.
$sel:secretArn:BatchExecuteStatement'
, batchExecuteStatementResponse_secretArn
- The name or ARN of the secret that enables access to the database.
$sel:httpStatus:BatchExecuteStatementResponse'
, batchExecuteStatementResponse_httpStatus
- The response's http status code.
ListTables (Paginated)
data ListTables Source #
See: newListTables
smart constructor.
ListTables' (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Natural) (Maybe Text) Text Text |
Instances
Create a value of ListTables
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dbUser:ListTables'
, listTables_dbUser
- The database user name. This parameter is required when authenticating
using temporary credentials.
$sel:connectedDatabase:ListTables'
, listTables_connectedDatabase
- A database name. The connected database is specified when you connect
with your authentication credentials.
$sel:nextToken:ListTables'
, listTables_nextToken
- 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.
$sel:secretArn:ListTables'
, listTables_secretArn
- The name or ARN of the secret that enables access to the database. This
parameter is required when authenticating using Secrets Manager.
$sel:tablePattern:ListTables'
, listTables_tablePattern
- 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.
$sel:maxResults:ListTables'
, listTables_maxResults
- 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.
$sel:schemaPattern:ListTables'
, listTables_schemaPattern
- 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.
$sel:clusterIdentifier:ListTables'
, listTables_clusterIdentifier
- The cluster identifier. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
$sel:database:ListTables'
, listTables_database
- 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.
data ListTablesResponse Source #
See: newListTablesResponse
smart constructor.
Instances
newListTablesResponse Source #
Create a value of ListTablesResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:nextToken:ListTables'
, listTablesResponse_nextToken
- 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.
$sel:tables:ListTablesResponse'
, listTablesResponse_tables
- The tables that match the request pattern.
$sel:httpStatus:ListTablesResponse'
, listTablesResponse_httpStatus
- The response's http status code.
ExecuteStatement
data ExecuteStatement Source #
See: newExecuteStatement
smart constructor.
ExecuteStatement' (Maybe Text) (Maybe Text) (Maybe (NonEmpty SqlParameter)) (Maybe Text) (Maybe Bool) Text Text Text |
Instances
:: Text | |
-> Text | |
-> Text | |
-> ExecuteStatement |
Create a value of ExecuteStatement
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dbUser:ExecuteStatement'
, executeStatement_dbUser
- The database user name. This parameter is required when authenticating
using temporary credentials.
$sel:statementName:ExecuteStatement'
, executeStatement_statementName
- The name of the SQL statement. You can name the SQL statement when you
create it to identify the query.
$sel:parameters:ExecuteStatement'
, executeStatement_parameters
- The parameters for the SQL statement.
$sel:secretArn:ExecuteStatement'
, executeStatement_secretArn
- The name or ARN of the secret that enables access to the database. This
parameter is required when authenticating using Secrets Manager.
$sel:withEvent:ExecuteStatement'
, executeStatement_withEvent
- A value that indicates whether to send an event to the Amazon
EventBridge event bus after the SQL statement runs.
$sel:clusterIdentifier:ExecuteStatement'
, executeStatement_clusterIdentifier
- The cluster identifier. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
$sel:database:ExecuteStatement'
, executeStatement_database
- The name of the database. This parameter is required when authenticating
using either Secrets Manager or temporary credentials.
$sel:sql:ExecuteStatement'
, executeStatement_sql
- The SQL statement text to run.
data ExecuteStatementResponse Source #
See: newExecuteStatementResponse
smart constructor.
ExecuteStatementResponse' (Maybe Text) (Maybe Text) (Maybe POSIX) (Maybe Text) (Maybe Text) (Maybe Text) Int |
Instances
newExecuteStatementResponse Source #
Create a value of ExecuteStatementResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:dbUser:ExecuteStatement'
, executeStatementResponse_dbUser
- The database user name.
$sel:database:ExecuteStatement'
, executeStatementResponse_database
- The name of the database.
$sel:createdAt:ExecuteStatementResponse'
, executeStatementResponse_createdAt
- The date and time (UTC) the statement was created.
$sel:clusterIdentifier:ExecuteStatement'
, executeStatementResponse_clusterIdentifier
- The cluster identifier.
$sel:id:ExecuteStatementResponse'
, executeStatementResponse_id
- 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.
$sel:secretArn:ExecuteStatement'
, executeStatementResponse_secretArn
- The name or ARN of the secret that enables access to the database.
$sel:httpStatus:ExecuteStatementResponse'
, executeStatementResponse_httpStatus
- The response's http status code.
GetStatementResult (Paginated)
data GetStatementResult Source #
See: newGetStatementResult
smart constructor.
Instances
newGetStatementResult Source #
Create a value of GetStatementResult
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:nextToken:GetStatementResult'
, getStatementResult_nextToken
- 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.
$sel:id:GetStatementResult'
, getStatementResult_id
- 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
.
data GetStatementResultResponse Source #
See: newGetStatementResultResponse
smart constructor.
GetStatementResultResponse' (Maybe Integer) (Maybe Text) (Maybe [ColumnMetadata]) Int [[Field]] |
Instances
newGetStatementResultResponse Source #
Create a value of GetStatementResultResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:totalNumRows:GetStatementResultResponse'
, getStatementResultResponse_totalNumRows
- 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.
$sel:nextToken:GetStatementResult'
, getStatementResultResponse_nextToken
- 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.
$sel:columnMetadata:GetStatementResultResponse'
, getStatementResultResponse_columnMetadata
- The properties (metadata) of a column.
$sel:httpStatus:GetStatementResultResponse'
, getStatementResultResponse_httpStatus
- The response's http status code.
$sel:records:GetStatementResultResponse'
, getStatementResultResponse_records
- The results of the SQL statement.
Types
StatementStatusString
newtype StatementStatusString Source #
pattern StatementStatusString_ABORTED :: StatementStatusString | |
pattern StatementStatusString_FAILED :: StatementStatusString | |
pattern StatementStatusString_FINISHED :: StatementStatusString | |
pattern StatementStatusString_PICKED :: StatementStatusString | |
pattern StatementStatusString_STARTED :: StatementStatusString | |
pattern StatementStatusString_SUBMITTED :: StatementStatusString |
Instances
StatusString
newtype StatusString Source #
pattern StatusString_ABORTED :: StatusString | |
pattern StatusString_ALL :: StatusString | |
pattern StatusString_FAILED :: StatusString | |
pattern StatusString_FINISHED :: StatusString | |
pattern StatusString_PICKED :: StatusString | |
pattern StatusString_STARTED :: StatusString | |
pattern StatusString_SUBMITTED :: StatusString |
Instances
ColumnMetadata
data ColumnMetadata Source #
The properties (metadata) of a column.
See: newColumnMetadata
smart constructor.
ColumnMetadata' (Maybe Int) (Maybe Text) (Maybe Bool) (Maybe Text) (Maybe Bool) (Maybe Int) (Maybe Int) (Maybe Text) (Maybe Text) (Maybe Bool) (Maybe Text) (Maybe Int) (Maybe Text) |
Instances
newColumnMetadata :: ColumnMetadata Source #
Create a value of ColumnMetadata
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:length:ColumnMetadata'
, columnMetadata_length
- The length of the column.
$sel:typeName:ColumnMetadata'
, columnMetadata_typeName
- The database-specific data type of the column.
$sel:isCaseSensitive:ColumnMetadata'
, columnMetadata_isCaseSensitive
- A value that indicates whether the column is case-sensitive.
$sel:columnDefault:ColumnMetadata'
, columnMetadata_columnDefault
- The default value of the column.
$sel:isCurrency:ColumnMetadata'
, columnMetadata_isCurrency
- A value that indicates whether the column contains currency values.
$sel:scale:ColumnMetadata'
, columnMetadata_scale
- The scale value of a decimal number column.
$sel:precision:ColumnMetadata'
, columnMetadata_precision
- The precision value of a decimal number column.
$sel:schemaName:ColumnMetadata'
, columnMetadata_schemaName
- The name of the schema that contains the table that includes the column.
$sel:name:ColumnMetadata'
, columnMetadata_name
- The name of the column.
$sel:isSigned:ColumnMetadata'
, columnMetadata_isSigned
- A value that indicates whether an integer column is signed.
$sel:label:ColumnMetadata'
, columnMetadata_label
- The label for the column.
$sel:nullable:ColumnMetadata'
, columnMetadata_nullable
- A value that indicates whether the column is nullable.
$sel:tableName:ColumnMetadata'
, columnMetadata_tableName
- The name of the table that includes the column.
Field
A data value in a column.
See: newField
smart constructor.
Instances
Create a value of Field
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:doubleValue:Field'
, field_doubleValue
- A value of the double data type.
$sel:stringValue:Field'
, field_stringValue
- A value of the string data type.
$sel:longValue:Field'
, field_longValue
- A value of the long data type.
$sel:booleanValue:Field'
, field_booleanValue
- A value of the Boolean data type.
$sel:blobValue:Field'
, field_blobValue
- 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.
$sel:isNull:Field'
, field_isNull
- A value that indicates whether the data is NULL.
SqlParameter
data SqlParameter Source #
A parameter used in a SQL statement.
See: newSqlParameter
smart constructor.
Instances
Create a value of SqlParameter
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:name:SqlParameter'
, sqlParameter_name
- The name of the parameter.
$sel:value:SqlParameter'
, sqlParameter_value
- 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
data StatementData Source #
The SQL statement to run.
See: newStatementData
smart constructor.
StatementData' (Maybe StatusString) (Maybe POSIX) (Maybe (NonEmpty SqlParameter)) (Maybe [Text]) (Maybe Text) (Maybe Text) (Maybe POSIX) (Maybe Text) (Maybe Bool) Text |
Instances
Create a value of StatementData
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:status:StatementData'
, statementData_status
- The status of the SQL statement. An example is the that the SQL
statement finished.
$sel:createdAt:StatementData'
, statementData_createdAt
- The date and time (UTC) the statement was created.
$sel:queryParameters:StatementData'
, statementData_queryParameters
- The parameters used in a SQL statement.
$sel:queryStrings:StatementData'
, statementData_queryStrings
- One or more SQL statements. Each query string in the array corresponds
to one of the queries in a batch query request.
$sel:queryString:StatementData'
, statementData_queryString
- The SQL statement.
$sel:statementName:StatementData'
, statementData_statementName
- The name of the SQL statement.
$sel:updatedAt:StatementData'
, statementData_updatedAt
- The date and time (UTC) that the statement metadata was last updated.
$sel:secretArn:StatementData'
, statementData_secretArn
- The name or Amazon Resource Name (ARN) of the secret that enables access
to the database.
$sel:isBatchStatement:StatementData'
, statementData_isBatchStatement
- A value that indicates whether the statement is a batch query request.
$sel:id:StatementData'
, statementData_id
- The SQL statement identifier. This value is a universally unique
identifier (UUID) generated by Amazon Redshift Data API.
SubStatementData
data SubStatementData Source #
Information about an SQL statement.
See: newSubStatementData
smart constructor.
SubStatementData' (Maybe StatementStatusString) (Maybe Integer) (Maybe Integer) (Maybe POSIX) (Maybe Text) (Maybe Integer) (Maybe Bool) (Maybe Text) (Maybe POSIX) (Maybe Integer) Text |
Instances
Create a value of SubStatementData
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:status:SubStatementData'
, subStatementData_status
- The status of the SQL statement. An example is the that the SQL
statement finished.
$sel:redshiftQueryId:SubStatementData'
, subStatementData_redshiftQueryId
- The SQL statement identifier. This value is a universally unique
identifier (UUID) generated by Amazon Redshift Data API.
$sel:resultSize:SubStatementData'
, subStatementData_resultSize
- The size in bytes of the returned results. A -1
indicates the value is
null.
$sel:createdAt:SubStatementData'
, subStatementData_createdAt
- The date and time (UTC) the statement was created.
$sel:error:SubStatementData'
, subStatementData_error
- The error message from the cluster if the SQL statement encountered an
error while running.
$sel:resultRows:SubStatementData'
, subStatementData_resultRows
- 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.
$sel:hasResultSet:SubStatementData'
, subStatementData_hasResultSet
- A value that indicates whether the statement has a result set. The
result set can be empty.
$sel:queryString:SubStatementData'
, subStatementData_queryString
- The SQL statement text.
$sel:updatedAt:SubStatementData'
, subStatementData_updatedAt
- The date and time (UTC) that the statement metadata was last updated.
$sel:duration:SubStatementData'
, subStatementData_duration
- The amount of time in nanoseconds that the statement ran.
$sel:id:SubStatementData'
, subStatementData_id
- 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
data TableMember Source #
The properties of a table.
See: newTableMember
smart constructor.
Instances
newTableMember :: TableMember Source #
Create a value of TableMember
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:schema:TableMember'
, tableMember_schema
- The schema containing the table.
$sel:name:TableMember'
, tableMember_name
- The name of the table.
$sel:type':TableMember'
, tableMember_type
- The type of the table. Possible values include TABLE, VIEW, SYSTEM
TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, and SYNONYM.