CfnLogAlarmProps

class aws_cdk.aws_cloudwatch.CfnLogAlarmProps(*, comparison_operator, query_results_to_alarm, query_results_to_evaluate, scheduled_query_configuration, threshold, action_log_line_count=None, action_log_line_role_arn=None, actions_enabled=None, alarm_actions=None, alarm_description=None, alarm_name=None, insufficient_data_actions=None, ok_actions=None, tags=None, treat_missing_data=None)

Bases: object

Properties for defining a CfnLogAlarm.

Parameters:
  • comparison_operator (str) – The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.

  • query_results_to_alarm (Union[int, float]) – The number of query results that must be breaching to trigger the alarm.

  • query_results_to_evaluate (Union[int, float]) – The number of query results over which data is compared to the specified threshold.

  • scheduled_query_configuration (Union[IResolvable, ScheduledQueryConfigurationProperty, Dict[str, Any]]) – The scheduled query configuration for the log alarm.

  • threshold (Union[int, float]) – The value to compare against the results of the scheduled query evaluation.

  • action_log_line_count (Union[int, float, None]) – The number of log lines to include in alarm notifications. Valid values are 0 to 50.

  • action_log_line_role_arn (Optional[str]) – The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.

  • actions_enabled (Union[bool, IResolvable, None]) – Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE. Default: - true

  • alarm_actions (Optional[Sequence[str]]) – The list of actions to execute when this alarm transitions into an ALARM state from any other state.

  • alarm_description (Optional[str]) – The description of the log alarm.

  • alarm_name (Optional[str]) – The name of the log alarm.

  • insufficient_data_actions (Optional[Sequence[str]]) – The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.

  • ok_actions (Optional[Sequence[str]]) – The actions to execute when this alarm transitions to the OK state from any other state.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – A list of key-value pairs to associate with the log alarm.

  • treat_missing_data (Optional[str]) – Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html

ExampleMetadata:

fixture=_generated

Example:

from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudwatch as cloudwatch

cfn_log_alarm_props = cloudwatch.CfnLogAlarmProps(
    comparison_operator="comparisonOperator",
    query_results_to_alarm=123,
    query_results_to_evaluate=123,
    scheduled_query_configuration=cloudwatch.CfnLogAlarm.ScheduledQueryConfigurationProperty(
        aggregation_expression="aggregationExpression",
        log_group_identifiers=["logGroupIdentifiers"],
        query_language="queryLanguage",
        query_string="queryString",
        schedule_configuration=cloudwatch.CfnLogAlarm.ScheduleConfigurationProperty(
            schedule_expression="scheduleExpression",

            # the properties below are optional
            end_time_offset=123,
            start_time_offset=123
        ),
        scheduled_query_role_arn="scheduledQueryRoleArn"
    ),
    threshold=123,

    # the properties below are optional
    action_log_line_count=123,
    action_log_line_role_arn="actionLogLineRoleArn",
    actions_enabled=False,
    alarm_actions=["alarmActions"],
    alarm_description="alarmDescription",
    alarm_name="alarmName",
    insufficient_data_actions=["insufficientDataActions"],
    ok_actions=["okActions"],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    treat_missing_data="treatMissingData"
)

Attributes

action_log_line_count

The number of log lines to include in alarm notifications.

Valid values are 0 to 50.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-actionloglinecount

action_log_line_role_arn

The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications.

Required when ActionLogLineCount is greater than 0.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-actionloglinerolearn

actions_enabled

Indicates whether actions should be executed during any changes to the alarm state.

The default is TRUE.

Default:
  • true

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-actionsenabled

alarm_actions

The list of actions to execute when this alarm transitions into an ALARM state from any other state.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-alarmactions

alarm_description

The description of the log alarm.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-alarmdescription

alarm_name

The name of the log alarm.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-alarmname

comparison_operator

The arithmetic operation to use when comparing the specified threshold and the query results.

Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-comparisonoperator

insufficient_data_actions

The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-insufficientdataactions

ok_actions

The actions to execute when this alarm transitions to the OK state from any other state.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-okactions

query_results_to_alarm

The number of query results that must be breaching to trigger the alarm.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-queryresultstoalarm

query_results_to_evaluate

The number of query results over which data is compared to the specified threshold.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-queryresultstoevaluate

scheduled_query_configuration

The scheduled query configuration for the log alarm.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-scheduledqueryconfiguration

tags

A list of key-value pairs to associate with the log alarm.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-tags

threshold

The value to compare against the results of the scheduled query evaluation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-threshold

treat_missing_data

Sets how this alarm is to handle missing data points.

Valid values are breaching, notBreaching, ignore, and missing.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html#cfn-cloudwatch-logalarm-treatmissingdata