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.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.

Synopsis

Creating a Request

data DescribeStatement Source #

See: newDescribeStatement smart constructor.

Constructors

DescribeStatement' 

Fields

  • id :: Text

    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.

Instances

Instances details
Eq DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

Read DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

Show DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

Generic DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

Associated Types

type Rep DescribeStatement :: Type -> Type #

NFData DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

Methods

rnf :: DescribeStatement -> () #

Hashable DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

ToJSON DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

AWSRequest DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

Associated Types

type AWSResponse DescribeStatement #

ToHeaders DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

ToPath DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

ToQuery DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

type Rep DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

type Rep DescribeStatement = D1 ('MetaData "DescribeStatement" "Amazonka.RedshiftData.DescribeStatement" "libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data" 'False) (C1 ('MetaCons "DescribeStatement'" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
type AWSResponse DescribeStatement Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

newDescribeStatement Source #

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.

Constructors

DescribeStatementResponse' 

Fields

  • status :: Maybe StatusString

    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.
  • redshiftQueryId :: Maybe Integer

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

  • resultSize :: Maybe Integer

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

  • dbUser :: Maybe Text

    The database user name.

  • subStatements :: Maybe [SubStatementData]

    The SQL statements from a multiple statement run.

  • database :: Maybe Text

    The name of the database.

  • createdAt :: Maybe POSIX

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

  • queryParameters :: Maybe (NonEmpty SqlParameter)

    The parameters for the SQL statement.

  • error :: Maybe Text

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

  • resultRows :: Maybe Integer

    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.

  • redshiftPid :: Maybe Integer

    The process identifier from Amazon Redshift.

  • clusterIdentifier :: Maybe Text

    The cluster identifier.

  • hasResultSet :: Maybe Bool

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

  • queryString :: Maybe Text

    The SQL statement text.

  • updatedAt :: Maybe POSIX

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

  • secretArn :: Maybe Text

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

  • duration :: Maybe Integer

    The amount of time in nanoseconds that the statement ran.

  • httpStatus :: Int

    The response's http status code.

  • id :: Text

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

Instances

Instances details
Eq DescribeStatementResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

Read DescribeStatementResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

Show DescribeStatementResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

Generic DescribeStatementResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

Associated Types

type Rep DescribeStatementResponse :: Type -> Type #

NFData DescribeStatementResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

type Rep DescribeStatementResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.DescribeStatement

type Rep DescribeStatementResponse = D1 ('MetaData "DescribeStatementResponse" "Amazonka.RedshiftData.DescribeStatement" "libZSservicesZSamazonka-redshift-dataZSamazonka-redshift-data" 'False) (C1 ('MetaCons "DescribeStatementResponse'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe StatusString)) :*: S1 ('MetaSel ('Just "redshiftQueryId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer))) :*: (S1 ('MetaSel ('Just "resultSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "dbUser") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "subStatements") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [SubStatementData])) :*: S1 ('MetaSel ('Just "database") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "createdAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: (S1 ('MetaSel ('Just "queryParameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty SqlParameter))) :*: S1 ('MetaSel ('Just "error") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))))) :*: (((S1 ('MetaSel ('Just "resultRows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "redshiftPid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer))) :*: (S1 ('MetaSel ('Just "clusterIdentifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "hasResultSet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "queryString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "updatedAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "secretArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "duration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))))

newDescribeStatementResponse Source #

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_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.