libZSservicesZSamazonka-athenaZSamazonka-athena
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.Athena.GetQueryResults

Description

Streams the results of a single query execution specified by QueryExecutionId from the Athena query results location in Amazon S3. For more information, see Query Results in the Amazon Athena User Guide. This request does not execute the query but returns results. Use StartQueryExecution to run a query.

To stream query results successfully, the IAM principal with permission to call GetQueryResults also must have permissions to the Amazon S3 GetObject action for the Athena query results location.

IAM principals with permission to the Amazon S3 GetObject action for the query results location are able to retrieve query results from Amazon S3 even if permission to the GetQueryResults action is denied. To restrict user or role access, ensure that Amazon S3 permissions to the Athena query location are denied.

This operation returns paginated results.

Synopsis

Creating a Request

data GetQueryResults Source #

See: newGetQueryResults smart constructor.

Constructors

GetQueryResults' 

Fields

  • nextToken :: Maybe Text

    A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

  • maxResults :: Maybe Natural

    The maximum number of results (rows) to return in this request.

  • queryExecutionId :: Text

    The unique ID of the query execution.

Instances

Instances details
Eq GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

Read GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

Show GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

Generic GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

Associated Types

type Rep GetQueryResults :: Type -> Type #

NFData GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

Methods

rnf :: GetQueryResults -> () #

Hashable GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

ToJSON GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

AWSPager GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

AWSRequest GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

Associated Types

type AWSResponse GetQueryResults #

ToHeaders GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

ToPath GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

ToQuery GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

type Rep GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

type Rep GetQueryResults = D1 ('MetaData "GetQueryResults" "Amazonka.Athena.GetQueryResults" "libZSservicesZSamazonka-athenaZSamazonka-athena" 'False) (C1 ('MetaCons "GetQueryResults'" 'PrefixI 'True) (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "queryExecutionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse GetQueryResults Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

newGetQueryResults Source #

Create a value of GetQueryResults 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:GetQueryResults', getQueryResults_nextToken - A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

$sel:maxResults:GetQueryResults', getQueryResults_maxResults - The maximum number of results (rows) to return in this request.

$sel:queryExecutionId:GetQueryResults', getQueryResults_queryExecutionId - The unique ID of the query execution.

Request Lenses

getQueryResults_nextToken :: Lens' GetQueryResults (Maybe Text) Source #

A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

getQueryResults_maxResults :: Lens' GetQueryResults (Maybe Natural) Source #

The maximum number of results (rows) to return in this request.

getQueryResults_queryExecutionId :: Lens' GetQueryResults Text Source #

The unique ID of the query execution.

Destructuring the Response

data GetQueryResultsResponse Source #

See: newGetQueryResultsResponse smart constructor.

Constructors

GetQueryResultsResponse' 

Fields

  • updateCount :: Maybe Integer

    The number of rows inserted with a CREATE TABLE AS SELECT statement.

  • nextToken :: Maybe Text

    A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

  • resultSet :: Maybe ResultSet

    The results of the query execution.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq GetQueryResultsResponse Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

Read GetQueryResultsResponse Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

Show GetQueryResultsResponse Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

Generic GetQueryResultsResponse Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

Associated Types

type Rep GetQueryResultsResponse :: Type -> Type #

NFData GetQueryResultsResponse Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

Methods

rnf :: GetQueryResultsResponse -> () #

type Rep GetQueryResultsResponse Source # 
Instance details

Defined in Amazonka.Athena.GetQueryResults

type Rep GetQueryResultsResponse = D1 ('MetaData "GetQueryResultsResponse" "Amazonka.Athena.GetQueryResults" "libZSservicesZSamazonka-athenaZSamazonka-athena" 'False) (C1 ('MetaCons "GetQueryResultsResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "updateCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "resultSet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ResultSet)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newGetQueryResultsResponse Source #

Create a value of GetQueryResultsResponse 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:updateCount:GetQueryResultsResponse', getQueryResultsResponse_updateCount - The number of rows inserted with a CREATE TABLE AS SELECT statement.

$sel:nextToken:GetQueryResults', getQueryResultsResponse_nextToken - A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

$sel:resultSet:GetQueryResultsResponse', getQueryResultsResponse_resultSet - The results of the query execution.

$sel:httpStatus:GetQueryResultsResponse', getQueryResultsResponse_httpStatus - The response's http status code.

Response Lenses

getQueryResultsResponse_updateCount :: Lens' GetQueryResultsResponse (Maybe Integer) Source #

The number of rows inserted with a CREATE TABLE AS SELECT statement.

getQueryResultsResponse_nextToken :: Lens' GetQueryResultsResponse (Maybe Text) Source #

A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.