- 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.
DisableInsightRulesCommand
Disables the specified Contributor Insights rules. When rules are disabled, they do not analyze log groups and do not incur costs.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { CloudWatchClient, DisableInsightRulesCommand } from "@aws-sdk/client-cloudwatch"; // ES Modules import
// const { CloudWatchClient, DisableInsightRulesCommand } = require("@aws-sdk/client-cloudwatch"); // CommonJS import
const client = new CloudWatchClient(config);
const input = { // DisableInsightRulesInput
RuleNames: [ // InsightRuleNames // required
"STRING_VALUE",
],
};
const command = new DisableInsightRulesCommand(input);
const response = await client.send(command);
// { // DisableInsightRulesOutput
// Failures: [ // BatchFailures
// { // PartialFailure
// FailureResource: "STRING_VALUE",
// ExceptionType: "STRING_VALUE",
// FailureCode: "STRING_VALUE",
// FailureDescription: "STRING_VALUE",
// },
// ],
// };
DisableInsightRulesCommand Input
See DisableInsightRulesCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
RuleNames Required | string[] | undefined | An array of the rule names to disable. If you need to find out the names of your rules, use DescribeInsightRules . |
DisableInsightRulesCommand Output
See DisableInsightRulesCommandOutput 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 disabled. You cannot disable 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. |