list_named_queries

Athena.Client.list_named_queries(**kwargs)

Provides a list of available query IDs only for queries saved in the specified workgroup. Requires that you have access to the specified workgroup. If a workgroup is not specified, lists the saved queries for the primary workgroup.

For code samples using the Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide .

See also: AWS API Documentation

Request Syntax

response = client.list_named_queries(
    NextToken='string',
    MaxResults=123,
    WorkGroup='string'
)
Parameters
  • NextToken (string) -- 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 (integer) -- The maximum number of queries to return in this request.
  • WorkGroup (string) -- The name of the workgroup from which the named queries are being returned. If a workgroup is not specified, the saved queries for the primary workgroup are returned.
Return type

dict

Returns

Response Syntax

{
    'NamedQueryIds': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • NamedQueryIds (list) --

      The list of unique query IDs.

      • (string) --
    • NextToken (string) --

      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.

Exceptions

  • Athena.Client.exceptions.InternalServerException
  • Athena.Client.exceptions.InvalidRequestException