:doc:`ConfigService <../../config>` / Client / get_stored_query

****************
get_stored_query
****************



.. py:method:: ConfigService.Client.get_stored_query(**kwargs)

  

  Returns the details of a specific stored query.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetStoredQuery>`_  


  **Request Syntax**
  ::

    response = client.get_stored_query(
        QueryName='string'
    )
    
  :type QueryName: string
  :param QueryName: **[REQUIRED]** 

    The name of the query.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'StoredQuery': {
              'QueryId': 'string',
              'QueryArn': 'string',
              'QueryName': 'string',
              'Description': 'string',
              'Expression': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **StoredQuery** *(dict) --* 

        Returns a ``StoredQuery`` object.

        
        

        - **QueryId** *(string) --* 

          The ID of the query.

          
        

        - **QueryArn** *(string) --* 

          Amazon Resource Name (ARN) of the query. For example, arn:partition:service:region:account-id:resource-type/resource-name/resource-id.

          
        

        - **QueryName** *(string) --* 

          The name of the query.

          
        

        - **Description** *(string) --* 

          A unique description for the query.

          
        

        - **Expression** *(string) --* 

          The expression of the query. For example, ``SELECT resourceId, resourceType, supplementaryConfiguration.BucketVersioningConfiguration.status WHERE resourceType = 'AWS::S3::Bucket' AND supplementaryConfiguration.BucketVersioningConfiguration.status = 'Off'.``

          
    
  
  **Exceptions**
  
  *   :py:class:`ConfigService.Client.exceptions.ValidationException`

  
  *   :py:class:`ConfigService.Client.exceptions.ResourceNotFoundException`

  