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[IAlarmRef]) – 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
# on_alarm_action: cloudwatch.IAlarmAction
# on_ok_action: cloudwatch.IAlarmAction
# actions_suppressor: cloudwatch.Alarm


alarm_rule = cloudwatch.AlarmRule.any_of(alarm1, alarm2)

my_composite_alarm = cloudwatch.CompositeAlarm(self, "MyAwesomeCompositeAlarm",
    alarm_rule=alarm_rule,
    actions_suppressor=actions_suppressor
)
my_composite_alarm.add_alarm_action(on_alarm_action)
my_composite_alarm.add_ok_action(on_ok_action)

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.