Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Amazonka.RedshiftData.DescribeStatement
Description
Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The information includes when the query started, when it finished, the query status, the number of rows returned, and the SQL statement.
For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide.
Synopsis
- data DescribeStatement = DescribeStatement' {}
- newDescribeStatement :: Text -> DescribeStatement
- describeStatement_id :: Lens' DescribeStatement Text
- data DescribeStatementResponse = DescribeStatementResponse' {
- clusterIdentifier :: Maybe Text
- createdAt :: Maybe POSIX
- database :: Maybe Text
- dbUser :: Maybe Text
- duration :: Maybe Integer
- error :: Maybe Text
- hasResultSet :: Maybe Bool
- queryParameters :: Maybe (NonEmpty SqlParameter)
- queryString :: Maybe Text
- redshiftPid :: Maybe Integer
- redshiftQueryId :: Maybe Integer
- resultRows :: Maybe Integer
- resultSize :: Maybe Integer
- secretArn :: Maybe Text
- status :: Maybe StatusString
- subStatements :: Maybe [SubStatementData]
- updatedAt :: Maybe POSIX
- workgroupName :: Maybe Text
- httpStatus :: Int
- id :: Text
- newDescribeStatementResponse :: Int -> Text -> DescribeStatementResponse
- describeStatementResponse_clusterIdentifier :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_createdAt :: Lens' DescribeStatementResponse (Maybe UTCTime)
- describeStatementResponse_database :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_dbUser :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_duration :: Lens' DescribeStatementResponse (Maybe Integer)
- describeStatementResponse_error :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_hasResultSet :: Lens' DescribeStatementResponse (Maybe Bool)
- describeStatementResponse_queryParameters :: Lens' DescribeStatementResponse (Maybe (NonEmpty SqlParameter))
- describeStatementResponse_queryString :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_redshiftPid :: Lens' DescribeStatementResponse (Maybe Integer)
- describeStatementResponse_redshiftQueryId :: Lens' DescribeStatementResponse (Maybe Integer)
- describeStatementResponse_resultRows :: Lens' DescribeStatementResponse (Maybe Integer)
- describeStatementResponse_resultSize :: Lens' DescribeStatementResponse (Maybe Integer)
- describeStatementResponse_secretArn :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_status :: Lens' DescribeStatementResponse (Maybe StatusString)
- describeStatementResponse_subStatements :: Lens' DescribeStatementResponse (Maybe [SubStatementData])
- describeStatementResponse_updatedAt :: Lens' DescribeStatementResponse (Maybe UTCTime)
- describeStatementResponse_workgroupName :: Lens' DescribeStatementResponse (Maybe Text)
- describeStatementResponse_httpStatus :: Lens' DescribeStatementResponse Int
- describeStatementResponse_id :: Lens' DescribeStatementResponse Text
Creating a Request
data DescribeStatement Source #
See: newDescribeStatement
smart constructor.
Constructors
DescribeStatement' | |
Fields
|
Instances
Arguments
:: Text | |
-> DescribeStatement |
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:
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.
Constructors
DescribeStatementResponse' | |
Fields
|
Instances
newDescribeStatementResponse Source #
Arguments
:: 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:clusterIdentifier:DescribeStatementResponse'
, describeStatementResponse_clusterIdentifier
- The cluster identifier.
DescribeStatementResponse
, describeStatementResponse_createdAt
- The date and time (UTC) when the SQL statement was submitted to run.
$sel:database:DescribeStatementResponse'
, describeStatementResponse_database
- The name of the database.
$sel:dbUser:DescribeStatementResponse'
, describeStatementResponse_dbUser
- The database user name.
DescribeStatementResponse
, describeStatementResponse_duration
- The amount of time in nanoseconds that the statement ran.
DescribeStatementResponse
, describeStatementResponse_error
- The error message from the cluster if the SQL statement encountered an
error while running.
DescribeStatementResponse
, describeStatementResponse_hasResultSet
- A value that indicates whether the statement has a result set. The
result set can be empty. The value is true for an empty result set. The
value is true if any substatement returns a result set.
DescribeStatementResponse
, describeStatementResponse_queryParameters
- The parameters for the SQL statement.
DescribeStatementResponse
, describeStatementResponse_queryString
- The SQL statement text.
$sel:redshiftPid:DescribeStatementResponse'
, describeStatementResponse_redshiftPid
- The process identifier from Amazon Redshift.
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.
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.
DescribeStatementResponse
, describeStatementResponse_resultSize
- The size in bytes of the returned results. A -1
indicates the value is
null.
DescribeStatementResponse
, describeStatementResponse_secretArn
- The name or Amazon Resource Name (ARN) of the secret that enables access
to the database.
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:subStatements:DescribeStatementResponse'
, describeStatementResponse_subStatements
- The SQL statements from a multiple statement run.
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:workgroupName:DescribeStatementResponse'
, describeStatementResponse_workgroupName
- The serverless workgroup name.
$sel:httpStatus:DescribeStatementResponse'
, describeStatementResponse_httpStatus
- The response's http status code.
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_clusterIdentifier :: Lens' DescribeStatementResponse (Maybe Text) Source #
The cluster identifier.
describeStatementResponse_createdAt :: Lens' DescribeStatementResponse (Maybe UTCTime) Source #
The date and time (UTC) when the SQL statement was submitted to run.
describeStatementResponse_database :: Lens' DescribeStatementResponse (Maybe Text) Source #
The name of the database.
describeStatementResponse_dbUser :: Lens' DescribeStatementResponse (Maybe Text) Source #
The database user name.
describeStatementResponse_duration :: Lens' DescribeStatementResponse (Maybe Integer) Source #
The amount of time in nanoseconds that the statement ran.
describeStatementResponse_error :: Lens' DescribeStatementResponse (Maybe Text) Source #
The error message from the cluster if the SQL statement encountered an error while running.
describeStatementResponse_hasResultSet :: Lens' DescribeStatementResponse (Maybe Bool) Source #
A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set. The value is true if any substatement returns a result set.
describeStatementResponse_queryParameters :: Lens' DescribeStatementResponse (Maybe (NonEmpty SqlParameter)) Source #
The parameters for the SQL statement.
describeStatementResponse_queryString :: Lens' DescribeStatementResponse (Maybe Text) Source #
The SQL statement text.
describeStatementResponse_redshiftPid :: Lens' DescribeStatementResponse (Maybe Integer) Source #
The process identifier from Amazon Redshift.
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_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_resultSize :: Lens' DescribeStatementResponse (Maybe Integer) Source #
The size in bytes of the returned results. A -1
indicates the value is
null.
describeStatementResponse_secretArn :: Lens' DescribeStatementResponse (Maybe Text) Source #
The name or Amazon Resource Name (ARN) of the secret that enables access to the database.
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_subStatements :: Lens' DescribeStatementResponse (Maybe [SubStatementData]) Source #
The SQL statements from a multiple statement run.
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_workgroupName :: Lens' DescribeStatementResponse (Maybe Text) Source #
The serverless workgroup name.
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.