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 |
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.
Synopsis
- data DescribeStatement = DescribeStatement' {}
- newDescribeStatement :: Text -> DescribeStatement
- describeStatement_id :: Lens' DescribeStatement Text
- data DescribeStatementResponse = DescribeStatementResponse' {
- status :: Maybe StatusString
- redshiftQueryId :: Maybe Integer
- resultSize :: Maybe Integer
- dbUser :: Maybe Text
- subStatements :: Maybe [SubStatementData]
- database :: Maybe Text
- createdAt :: Maybe POSIX
- queryParameters :: Maybe (NonEmpty SqlParameter)
- error :: Maybe Text
- resultRows :: Maybe Integer
- redshiftPid :: Maybe Integer
- clusterIdentifier :: Maybe Text
- hasResultSet :: Maybe Bool
- queryString :: Maybe Text
- updatedAt :: Maybe POSIX
- secretArn :: Maybe Text
- duration :: Maybe Integer
- httpStatus :: Int
- id :: Text
- newDescribeStatementResponse :: Int -> Text -> DescribeStatementResponse
- describeStatementResponse_status :: Lens' DescribeStatementResponse (Maybe StatusString)
- describeStatementResponse_redshiftQueryId :: Lens' DescribeStatementResponse (Maybe Integer)
- describeStatementResponse_resultSize :: Lens' DescribeStatementResponse (Maybe Integer)
- describeStatementResponse_dbUser :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_subStatements :: Lens' DescribeStatementResponse (Maybe [SubStatementData])
- describeStatementResponse_database :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_createdAt :: Lens' DescribeStatementResponse (Maybe UTCTime)
- describeStatementResponse_queryParameters :: Lens' DescribeStatementResponse (Maybe (NonEmpty SqlParameter))
- describeStatementResponse_error :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_resultRows :: Lens' DescribeStatementResponse (Maybe Integer)
- describeStatementResponse_redshiftPid :: Lens' DescribeStatementResponse (Maybe Integer)
- describeStatementResponse_clusterIdentifier :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_hasResultSet :: Lens' DescribeStatementResponse (Maybe Bool)
- describeStatementResponse_queryString :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_updatedAt :: Lens' DescribeStatementResponse (Maybe UTCTime)
- describeStatementResponse_secretArn :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_duration :: Lens' DescribeStatementResponse (Maybe Integer)
- describeStatementResponse_httpStatus :: Lens' DescribeStatementResponse Int
- describeStatementResponse_id :: Lens' DescribeStatementResponse Text
Creating a Request
data DescribeStatement Source #
See: newDescribeStatement
smart constructor.
DescribeStatement' | |
|
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
.
Request Lenses
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
.
Destructuring the Response
data DescribeStatementResponse Source #
See: newDescribeStatementResponse
smart constructor.
DescribeStatementResponse' | |
|
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.
Response Lenses
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_dbUser :: Lens' DescribeStatementResponse (Maybe Text) Source #
The database user name.
describeStatementResponse_subStatements :: Lens' DescribeStatementResponse (Maybe [SubStatementData]) Source #
The SQL statements from a multiple statement run.
describeStatementResponse_database :: Lens' DescribeStatementResponse (Maybe Text) Source #
The name of the database.
describeStatementResponse_createdAt :: Lens' DescribeStatementResponse (Maybe UTCTime) Source #
The date and time (UTC) when the SQL statement was submitted to run.
describeStatementResponse_queryParameters :: Lens' DescribeStatementResponse (Maybe (NonEmpty SqlParameter)) Source #
The parameters for the SQL statement.
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_redshiftPid :: Lens' DescribeStatementResponse (Maybe Integer) Source #
The process identifier from Amazon Redshift.
describeStatementResponse_clusterIdentifier :: Lens' DescribeStatementResponse (Maybe Text) Source #
The cluster identifier.
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_queryString :: Lens' DescribeStatementResponse (Maybe Text) Source #
The SQL statement text.
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_httpStatus :: Lens' DescribeStatementResponse Int Source #
The response's http status code.
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.