CloudWatch / Client / disable_insight_rules

disable_insight_rules#

CloudWatch.Client.disable_insight_rules(**kwargs)#

Disables the specified Contributor Insights rules. When rules are disabled, they do not analyze log groups and do not incur costs.

See also: AWS API Documentation

Request Syntax

response = client.disable_insight_rules(
    RuleNames=[
        'string',
    ]
)
Parameters:

RuleNames (list) –

[REQUIRED]

An array of the rule names to disable. If you need to find out the names of your rules, use DescribeInsightRules.

  • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'Failures': [
        {
            'FailureResource': 'string',
            'ExceptionType': 'string',
            'FailureCode': 'string',
            'FailureDescription': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • Failures (list) –

      An array listing the rules that could not be disabled. You cannot disable built-in rules.

      • (dict) –

        This array is empty if the API operation was successful for all the rules specified in the request. If the operation could not process one of the rules, the following data is returned for each of those rules.

        • FailureResource (string) –

          The specified rule that could not be deleted.

        • ExceptionType (string) –

          The type of error.

        • FailureCode (string) –

          The code of the error.

        • FailureDescription (string) –

          A description of the error.

Exceptions

  • CloudWatch.Client.exceptions.InvalidParameterValueException

  • CloudWatch.Client.exceptions.MissingRequiredParameterException