aws-cdk-lib.aws_cloudwatch.CompositeAlarmProps

interface CompositeAlarmProps

LanguageType name
.NETAmazon.CDK.AWS.CloudWatch.CompositeAlarmProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#CompositeAlarmProps
Javasoftware.amazon.awscdk.services.cloudwatch.CompositeAlarmProps
Pythonaws_cdk.aws_cloudwatch.CompositeAlarmProps
TypeScript (source)aws-cdk-lib » aws_cloudwatch » CompositeAlarmProps

Properties for creating a Composite Alarm.

Example

declare const alarm1: cloudwatch.Alarm;
declare const alarm2: cloudwatch.Alarm;
declare const alarm3: cloudwatch.Alarm;
declare const alarm4: cloudwatch.Alarm;

const alarmRule = cloudwatch.AlarmRule.anyOf(
  cloudwatch.AlarmRule.allOf(
    cloudwatch.AlarmRule.anyOf(
      alarm1,
      cloudwatch.AlarmRule.fromAlarm(alarm2, cloudwatch.AlarmState.OK),
      alarm3,
    ),
    cloudwatch.AlarmRule.not(cloudwatch.AlarmRule.fromAlarm(alarm4, cloudwatch.AlarmState.INSUFFICIENT_DATA)),
  ),
  cloudwatch.AlarmRule.fromBoolean(false),
);

new cloudwatch.CompositeAlarm(this, 'MyAwesomeCompositeAlarm', {
  alarmRule,
});

Properties

NameTypeDescription
alarmRuleIAlarmRuleExpression that specifies which other alarms are to be evaluated to determine this composite alarm's state.
actionsEnabled?booleanWhether the actions for this alarm are enabled.
actionsSuppressor?IAlarmActions will be suppressed if the suppressor alarm is in the ALARM state.
actionsSuppressorExtensionPeriod?DurationThe maximum duration that the composite alarm waits after suppressor alarm goes out of the ALARM state.
actionsSuppressorWaitPeriod?DurationThe maximum duration that the composite alarm waits for the suppressor alarm to go into the ALARM state.
alarmDescription?stringDescription for the alarm.
compositeAlarmName?stringName of the alarm.

alarmRule

Type: IAlarmRule

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


actionsEnabled?

Type: boolean (optional, default: true)

Whether the actions for this alarm are enabled.


actionsSuppressor?

Type: IAlarm (optional, default: alarm will not be suppressed.)

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


actionsSuppressorExtensionPeriod?

Type: Duration (optional, default: 1 minute extension period will be set.)

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.


actionsSuppressorWaitPeriod?

Type: Duration (optional, default: 1 minute wait period will be set.)

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.


alarmDescription?

Type: string (optional, default: No description.)

Description for the alarm.


compositeAlarmName?

Type: string (optional, default: Automatically generated name.)

Name of the alarm.