amazonka-redshift-data-2.0: Amazon Redshift Data API Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.RedshiftData.GetStatementResult

Description

Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement results.

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.

This operation returns paginated results.

Synopsis

Creating a Request

data GetStatementResult Source #

See: newGetStatementResult smart constructor.

Constructors

GetStatementResult' 

Fields

  • nextToken :: Maybe Text

    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.

  • id :: Text

    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.

Instances

Instances details
ToJSON GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

ToHeaders GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

ToPath GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

ToQuery GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

AWSPager GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

AWSRequest GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Associated Types

type AWSResponse GetStatementResult #

Generic GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Associated Types

type Rep GetStatementResult :: Type -> Type #

Read GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Show GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

NFData GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Methods

rnf :: GetStatementResult -> () #

Eq GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Hashable GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

type AWSResponse GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

type Rep GetStatementResult Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

type Rep GetStatementResult = D1 ('MetaData "GetStatementResult" "Amazonka.RedshiftData.GetStatementResult" "amazonka-redshift-data-2.0-Hy9KEgtH5Bc3altuyuPuYo" 'False) (C1 ('MetaCons "GetStatementResult'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

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:

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.

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.

Request Lenses

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

A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.

getStatementResult_id :: Lens' GetStatementResult Text Source #

The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates then number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query. This identifier is returned by BatchExecuteStatment, ExecuteStatment, and ListStatements.

Destructuring the Response

data GetStatementResultResponse Source #

See: newGetStatementResultResponse smart constructor.

Constructors

GetStatementResultResponse' 

Fields

  • columnMetadata :: Maybe [ColumnMetadata]

    The properties (metadata) of a column.

  • nextToken :: Maybe Text

    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.

  • totalNumRows :: Maybe Integer

    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.

  • httpStatus :: Int

    The response's http status code.

  • records :: [[Field]]

    The results of the SQL statement.

Instances

Instances details
Generic GetStatementResultResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Associated Types

type Rep GetStatementResultResponse :: Type -> Type #

Read GetStatementResultResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Show GetStatementResultResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

NFData GetStatementResultResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

Eq GetStatementResultResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

type Rep GetStatementResultResponse Source # 
Instance details

Defined in Amazonka.RedshiftData.GetStatementResult

type Rep GetStatementResultResponse = D1 ('MetaData "GetStatementResultResponse" "Amazonka.RedshiftData.GetStatementResult" "amazonka-redshift-data-2.0-Hy9KEgtH5Bc3altuyuPuYo" 'False) (C1 ('MetaCons "GetStatementResultResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "columnMetadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ColumnMetadata])) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "totalNumRows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "records") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [[Field]])))))

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:columnMetadata:GetStatementResultResponse', getStatementResultResponse_columnMetadata - The properties (metadata) of a column.

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: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:httpStatus:GetStatementResultResponse', getStatementResultResponse_httpStatus - The response's http status code.

$sel:records:GetStatementResultResponse', getStatementResultResponse_records - The results of the SQL statement.

Response Lenses

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

A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.

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

The total number of rows in the result set returned from a query. You can use this number to estimate the number of calls to the GetStatementResult operation needed to page through the results.