:doc:`Athena <../../athena>` / Client / list_named_queries

******************
list_named_queries
******************



.. py:method:: 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.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueries>`_  


  **Request Syntax**
  ::

    response = client.list_named_queries(
        NextToken='string',
        MaxResults=123,
        WorkGroup='string'
    )
    
  :type NextToken: string
  :param 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.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of queries to return in this request.

    

  
  :type WorkGroup: string
  :param WorkGroup: 

    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.

    

  
  
  :rtype: 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**
  
  *   :py:class:`Athena.Client.exceptions.InternalServerException`

  
  *   :py:class:`Athena.Client.exceptions.InvalidRequestException`

  