Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

delete_query_definition

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

Request Syntax

response = client.delete_query_definition(
    queryDefinitionId='string'
)
Parameters
queryDefinitionId (string) --

[REQUIRED]

The ID of the query definition that you want to delete. You can use DescribeQueryDefinitions to retrieve the IDs of your saved query definitions.

Return type
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

  • CloudWatchLogs.Client.exceptions.InvalidParameterException
  • CloudWatchLogs.Client.exceptions.ResourceNotFoundException
  • CloudWatchLogs.Client.exceptions.ServiceUnavailableException