interface AtLeastOptions
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.CloudWatch.AtLeastOptions |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#AtLeastOptions |
Java | software.amazon.awscdk.services.cloudwatch.AtLeastOptions |
Python | aws_cdk.aws_cloudwatch.AtLeastOptions |
TypeScript (source) | aws-cdk-lib » aws_cloudwatch » AtLeastOptions |
Options for the AT_LEAST AlarmRule wrapper function.
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)),
// AT_LEAST with count: at least 2 of these alarms must be in ALARM state
cloudwatch.AlarmRule.atLeast(cloudwatch.AlarmState.ALARM, {
operands: [alarm1, alarm2, alarm3],
threshold: cloudwatch.AtLeastThreshold.count(2),
}),
// AT_LEAST with percentage and NOT: at least 60% must NOT be in OK state
cloudwatch.AlarmRule.atLeastNot(cloudwatch.AlarmState.OK, {
operands: [alarm1, alarm2, alarm3],
threshold: cloudwatch.AtLeastThreshold.percentage(60),
}),
),
cloudwatch.AlarmRule.fromBoolean(false),
);
new cloudwatch.CompositeAlarm(this, 'MyAwesomeCompositeAlarm', {
alarmRule,
});
Properties
| Name | Type | Description |
|---|---|---|
| operands | IAlarm[] | Alarms to evaluate in the AT_LEAST expression. |
| threshold | At | Threshold for the AT_LEAST expression. |
operands
Type:
IAlarm[]
Alarms to evaluate in the AT_LEAST expression.
Must contain at least one alarm.
threshold
Type:
At
Threshold for the AT_LEAST expression.
Use AtLeastThreshold.count() for an absolute number
or AtLeastThreshold.percentage() for a percentage.

.NET
Go
Java
Python
TypeScript (