:doc:`CloudWatchLogs <../../logs>` / Client / delete_query_definition

***********************
delete_query_definition
***********************



.. py:method:: CloudWatchLogs.Client.delete_query_definition(**kwargs)

  

  Deletes a saved CloudWatch Logs Insights query definition. A query definition contains details about a saved CloudWatch Logs Insights query.

   

  Each ``DeleteQueryDefinition`` operation can delete one query definition.

   

  You must have the ``logs:DeleteQueryDefinition`` permission to be able to perform this operation.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition>`_  


  **Request Syntax**
  ::

    response = client.delete_query_definition(
        queryDefinitionId='string'
    )
    
  :type queryDefinitionId: string
  :param queryDefinitionId: **[REQUIRED]** 

    The ID of the query definition that you want to delete. You can use `DescribeQueryDefinitions <https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html>`__ to retrieve the IDs of your saved query definitions.

    

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

    
    ::

      {
          'success': True|False
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **success** *(boolean) --* 

        A value of TRUE indicates that the operation succeeded. FALSE indicates that the operation failed.

        
  
  **Exceptions**
  
  *   :py:class:`CloudWatchLogs.Client.exceptions.InvalidParameterException`

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

  
  *   :py:class:`CloudWatchLogs.Client.exceptions.ServiceUnavailableException`

  