Skip to content

AlarmMuteRule

Source: src/AWS/CloudWatch/AlarmMuteRule.ts

A CloudWatch alarm mute rule — suppresses alarm actions on a recurring schedule (e.g. maintenance windows) instead of manually disabling and re-enabling alarm actions.

const rule = yield* AlarmMuteRule("NightlyMute", {
Rule: {
Schedule: {
Expression: "0 2 * * SUN",
Duration: "PT1H",
},
},
});
// init — bind the rule to the function (see GetAlarmMuteRule)
const getAlarmMuteRule = yield* AWS.CloudWatch.GetAlarmMuteRule(rule);
// runtime
const result = yield* getAlarmMuteRule();
const schedule = result.Rule?.Schedule;