We are excited to announce our new API Documentation.
Protected
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.
DeleteQueryDefinition
You must have the logs:DeleteQueryDefinition permission to be able to perform this operation.
logs:DeleteQueryDefinition
Use a bare-bones client and the command you need to make an API call.
import { CloudWatchLogsClient, DeleteQueryDefinitionCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import// const { CloudWatchLogsClient, DeleteQueryDefinitionCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS importconst client = new CloudWatchLogsClient(config);const input = { // DeleteQueryDefinitionRequest queryDefinitionId: "STRING_VALUE", // required};const command = new DeleteQueryDefinitionCommand(input);const response = await client.send(command);// { // DeleteQueryDefinitionResponse// success: true || false,// };
DeleteQueryDefinitionCommandInput
DeleteQueryDefinitionCommandOutput
input
response
config
InvalidParameterException (client fault)
A parameter is specified incorrectly.
ResourceNotFoundException (client fault)
The specified resource does not exist.
ServiceUnavailableException (server fault)
The service cannot complete the request.
CloudWatchLogsServiceException
Base exception class for all service exceptions from CloudWatchLogs service.
Readonly
Static
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.Example
Use a bare-bones client and the command you need to make an API call.
Param
DeleteQueryDefinitionCommandInput
Returns
DeleteQueryDefinitionCommandOutput
See
input
shape.response
shape.config
shape.Throws
InvalidParameterException (client fault)
A parameter is specified incorrectly.
Throws
ResourceNotFoundException (client fault)
The specified resource does not exist.
Throws
ServiceUnavailableException (server fault)
The service cannot complete the request.
Throws
CloudWatchLogsServiceException
Base exception class for all service exceptions from CloudWatchLogs service.