- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteInsightRulesCommand
Permanently deletes the specified Contributor Insights rules.
If you create a rule, delete it, and then re-create it with the same name, historical data from the first time the rule was created might not be available.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CloudWatchClient, DeleteInsightRulesCommand } from "@aws-sdk/client-cloudwatch"; // ES Modules import
// const { CloudWatchClient, DeleteInsightRulesCommand } = require("@aws-sdk/client-cloudwatch"); // CommonJS import
const client = new CloudWatchClient(config);
const input = { // DeleteInsightRulesInput
RuleNames: [ // InsightRuleNames // required
"STRING_VALUE",
],
};
const command = new DeleteInsightRulesCommand(input);
const response = await client.send(command);
// { // DeleteInsightRulesOutput
// Failures: [ // BatchFailures
// { // PartialFailure
// FailureResource: "STRING_VALUE",
// ExceptionType: "STRING_VALUE",
// FailureCode: "STRING_VALUE",
// FailureDescription: "STRING_VALUE",
// },
// ],
// };
DeleteInsightRulesCommand Input
See DeleteInsightRulesCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
RuleNames Required | string[] | undefined | An array of the rule names to delete. If you need to find out the names of your rules, use DescribeInsightRules . |
DeleteInsightRulesCommand Output
See DeleteInsightRulesCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Failures | PartialFailure[] | undefined | An array listing the rules that could not be deleted. You cannot delete built-in rules. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidParameterValueException | client | The value of an input parameter is bad or out-of-range. |
MissingRequiredParameterException | client | An input parameter that is required is missing. |
CloudWatchServiceException | Base exception class for all service exceptions from CloudWatch service. |