CompositeAlarmProps

class aws_cdk.aws_cloudwatch.CompositeAlarmProps(*, alarm_rule, actions_enabled=None, actions_suppressor=None, actions_suppressor_extension_period=None, actions_suppressor_wait_period=None, alarm_description=None, composite_alarm_name=None)

Bases: object

Properties for creating a Composite Alarm.

Parameters:
  • alarm_rule (IAlarmRule) – Expression that specifies which other alarms are to be evaluated to determine this composite alarm’s state.

  • actions_enabled (Optional[bool]) – Whether the actions for this alarm are enabled. Default: true

  • actions_suppressor (Optional[IAlarm]) – Actions will be suppressed if the suppressor alarm is in the ALARM state. Default: - alarm will not be suppressed.

  • actions_suppressor_extension_period (Optional[Duration]) – The maximum duration that the composite alarm waits after suppressor alarm goes out of the ALARM state. After this time, the composite alarm performs its actions. Default: - 1 minute extension period will be set.

  • actions_suppressor_wait_period (Optional[Duration]) – The maximum duration that the composite alarm waits for the suppressor alarm to go into the ALARM state. After this time, the composite alarm performs its actions. Default: - 1 minute wait period will be set.

  • alarm_description (Optional[str]) – Description for the alarm. Default: - No description.

  • composite_alarm_name (Optional[str]) – Name of the alarm. Default: - Automatically generated name.

ExampleMetadata:

infused

Example:

# alarm1: cloudwatch.Alarm
# alarm2: cloudwatch.Alarm
# alarm3: cloudwatch.Alarm
# alarm4: cloudwatch.Alarm


alarm_rule = cloudwatch.AlarmRule.any_of(
    cloudwatch.AlarmRule.all_of(
        cloudwatch.AlarmRule.any_of(alarm1,
            cloudwatch.AlarmRule.from_alarm(alarm2, cloudwatch.AlarmState.OK), alarm3),
        cloudwatch.AlarmRule.not(cloudwatch.AlarmRule.from_alarm(alarm4, cloudwatch.AlarmState.INSUFFICIENT_DATA))),
    cloudwatch.AlarmRule.from_boolean(False))

cloudwatch.CompositeAlarm(self, "MyAwesomeCompositeAlarm",
    alarm_rule=alarm_rule
)

Attributes

actions_enabled

Whether the actions for this alarm are enabled.

Default:

true

actions_suppressor

Actions will be suppressed if the suppressor alarm is in the ALARM state.

Default:
  • alarm will not be suppressed.

actions_suppressor_extension_period

The maximum duration that the composite alarm waits after suppressor alarm goes out of the ALARM state.

After this time, the composite alarm performs its actions.

Default:
  • 1 minute extension period will be set.

actions_suppressor_wait_period

The maximum duration that the composite alarm waits for the suppressor alarm to go into the ALARM state.

After this time, the composite alarm performs its actions.

Default:
  • 1 minute wait period will be set.

alarm_description

Description for the alarm.

Default:
  • No description.

alarm_rule

Expression that specifies which other alarms are to be evaluated to determine this composite alarm’s state.

composite_alarm_name

Name of the alarm.

Default:
  • Automatically generated name.