CfnCompositeAlarmProps

class aws_cdk.aws_cloudwatch.CfnCompositeAlarmProps(*, alarm_rule, actions_enabled=None, actions_suppressor=None, actions_suppressor_extension_period=None, actions_suppressor_wait_period=None, alarm_actions=None, alarm_description=None, alarm_name=None, insufficient_data_actions=None, ok_actions=None)

Bases: object

Properties for defining a CfnCompositeAlarm.

Parameters:
  • alarm_rule (str) – An expression that specifies which other alarms are to be evaluated to determine this composite alarm’s state. For each alarm that you reference, you designate a function that specifies whether that alarm needs to be in ALARM state, OK state, or INSUFFICIENT_DATA state. You can use operators (AND, OR and NOT) to combine multiple functions in a single expression. You can use parenthesis to logically group the functions in your expression. You can use either alarm names or ARNs to reference the other alarms that are to be evaluated. Functions can include the following: - ALARM(“alarm-name or alarm-ARN”) is TRUE if the named alarm is in ALARM state. - OK(“alarm-name or alarm-ARN”) is TRUE if the named alarm is in OK state. - INSUFFICIENT_DATA(“alarm-name or alarm-ARN”) is TRUE if the named alarm is in INSUFFICIENT_DATA state. - TRUE always evaluates to TRUE. - FALSE always evaluates to FALSE. TRUE and FALSE are useful for testing a complex AlarmRule structure, and for testing your alarm actions. For more information about AlarmRule syntax, see PutCompositeAlarm in the Amazon CloudWatch API Reference .

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

  • actions_suppressor (Optional[str]) – Actions will be suppressed if the suppressor alarm is in the ALARM state. ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.

  • actions_suppressor_extension_period (Union[int, float, None]) – The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the ALARM state. After this time, the composite alarm performs its actions. .. epigraph:: ExtensionPeriod is required only when ActionsSuppressor is specified.

  • actions_suppressor_wait_period (Union[int, float, None]) – The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the ALARM state. After this time, the composite alarm performs its actions. .. epigraph:: WaitPeriod is required only when ActionsSuppressor is specified.

  • alarm_actions (Optional[Sequence[str]]) –

    The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .

  • alarm_description (Optional[str]) – The description for the composite alarm.

  • alarm_name (Optional[str]) – The name for the composite alarm. This name must be unique within your AWS account.

  • insufficient_data_actions (Optional[Sequence[str]]) –

    The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .

  • ok_actions (Optional[Sequence[str]]) –

    The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .

Link:

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

ExampleMetadata:

fixture=_generated

Example:

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

cfn_composite_alarm_props = cloudwatch.CfnCompositeAlarmProps(
    alarm_rule="alarmRule",

    # the properties below are optional
    actions_enabled=False,
    actions_suppressor="actionsSuppressor",
    actions_suppressor_extension_period=123,
    actions_suppressor_wait_period=123,
    alarm_actions=["alarmActions"],
    alarm_description="alarmDescription",
    alarm_name="alarmName",
    insufficient_data_actions=["insufficientDataActions"],
    ok_actions=["okActions"]
)

Attributes

actions_enabled

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

The default is TRUE.

Link:

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

actions_suppressor

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

ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.

Link:

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

actions_suppressor_extension_period

The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the ALARM state.

After this time, the composite alarm performs its actions. .. epigraph:

``ExtensionPeriod`` is required only when ``ActionsSuppressor`` is specified.
Link:

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

actions_suppressor_wait_period

The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the ALARM state.

After this time, the composite alarm performs its actions. .. epigraph:

``WaitPeriod`` is required only when ``ActionsSuppressor`` is specified.
Link:

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

alarm_actions

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

Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .

Link:

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

alarm_description

The description for the composite alarm.

Link:

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

alarm_name

The name for the composite alarm.

This name must be unique within your AWS account.

Link:

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

alarm_rule

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

For each alarm that you reference, you designate a function that specifies whether that alarm needs to be in ALARM state, OK state, or INSUFFICIENT_DATA state. You can use operators (AND, OR and NOT) to combine multiple functions in a single expression. You can use parenthesis to logically group the functions in your expression.

You can use either alarm names or ARNs to reference the other alarms that are to be evaluated.

Functions can include the following:

  • ALARM(“alarm-name or alarm-ARN”) is TRUE if the named alarm is in ALARM state.

  • OK(“alarm-name or alarm-ARN”) is TRUE if the named alarm is in OK state.

  • INSUFFICIENT_DATA(“alarm-name or alarm-ARN”) is TRUE if the named alarm is in INSUFFICIENT_DATA state.

  • TRUE always evaluates to TRUE.

  • FALSE always evaluates to FALSE.

TRUE and FALSE are useful for testing a complex AlarmRule structure, and for testing your alarm actions.

For more information about AlarmRule syntax, see PutCompositeAlarm in the Amazon CloudWatch API Reference .

Link:

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

insufficient_data_actions

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

Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .

Link:

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

ok_actions

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

Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .

Link:

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