CompositeAlarm

class aws_cdk.aws_cloudwatch.CompositeAlarm(scope, id, *, alarm_rule, actions_enabled=None, alarm_description=None, composite_alarm_name=None)

Bases: aws_cdk.aws_cloudwatch.AlarmBase

A Composite Alarm based on Alarm Rule.

__init__(scope, id, *, alarm_rule, actions_enabled=None, alarm_description=None, composite_alarm_name=None)
Parameters
  • scope (Construct) –

  • id (str) –

  • 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

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

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

Return type

None

Methods

add_alarm_action(*actions)

Trigger this action if the alarm fires.

Typically the ARN of an SNS topic or ARN of an AutoScaling policy.

Parameters

actions (IAlarmAction) –

Return type

None

add_insufficient_data_action(*actions)

Trigger this action if there is insufficient data to evaluate the alarm.

Typically the ARN of an SNS topic or ARN of an AutoScaling policy.

Parameters

actions (IAlarmAction) –

Return type

None

add_ok_action(*actions)

Trigger this action if the alarm returns from breaching state into ok state.

Typically the ARN of an SNS topic or ARN of an AutoScaling policy.

Parameters

actions (IAlarmAction) –

Return type

None

render_alarm_rule()

AlarmRule indicating ALARM state for Alarm.

Return type

str

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

alarm_arn

ARN of this alarm.

attribute: :attribute:: true

Return type

str

alarm_name

Name of this alarm.

attribute: :attribute:: true

Return type

str

node

The construct tree node associated with this construct.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

Static Methods

classmethod from_composite_alarm_arn(scope, id, composite_alarm_arn)

Import an existing CloudWatch composite alarm provided an ARN.

Parameters
  • scope (Construct) – The parent creating construct (usually this).

  • id (str) – The construct’s name.

  • composite_alarm_arn (str) – Composite Alarm ARN (i.e. arn:aws:cloudwatch:::alarm/CompositeAlarmName).

Return type

IAlarm

classmethod from_composite_alarm_name(scope, id, composite_alarm_name)

Import an existing CloudWatch composite alarm provided an Name.

Parameters
  • scope (Construct) – The parent creating construct (usually this).

  • id (str) – The construct’s name.

  • composite_alarm_name (str) – Composite Alarm Name.

Return type

IAlarm

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool