Class AlarmMuteRule

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.cloudwatch.AlarmMuteRule
All Implemented Interfaces:
IAlarmMuteRuleRef, IEnvironmentAware, IResource, IAlarmMuteRule, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.138.0 (build 0ca7ee8)", date="2026-08-10T14:50:59.307Z") @Stability(Stable) public class AlarmMuteRule extends Resource implements IAlarmMuteRule
A CloudWatch Alarm Mute Rule.

Example:

 Alarm alarm1;
 Alarm alarm2;
 AlarmMuteRule alarmMuteRule = AlarmMuteRule.Builder.create(this, "AlarmMuteRule")
         .alarms(List.of(alarm1))
         // Defines the mute period begins at 0:00 everyday in UTC
         .schedule(ScheduleExpression.cron(CronOptions.builder().minute("0").hour("0").build()))
         // Specifies the mute rule lasts 1 hour.
         .duration(Duration.hours(1))
         .build();
 // The mute target can be added after construction.
 alarmMuteRule.addAlarm(alarm2);
 
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Stable) public static final String PROPERTY_INJECTION_ID
      Uniquely identifies this class.
  • Constructor Details

    • AlarmMuteRule

      protected AlarmMuteRule(software.amazon.jsii.JsiiObjectRef objRef)
    • AlarmMuteRule

      protected AlarmMuteRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • AlarmMuteRule

      @Stability(Stable) public AlarmMuteRule(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AlarmMuteRuleProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromAlarmMuteRuleArn

      @Stability(Stable) @NotNull public static IAlarmMuteRule fromAlarmMuteRuleArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String alarmMuteRuleArn)
      Import an existing CloudWatch alarm mute rule provided an ARN.

      Parameters:
      scope - The parent creating construct (usually this). This parameter is required.
      id - The construct's name. This parameter is required.
      alarmMuteRuleArn - Alarm Mute Rule ARN. This parameter is required.
    • fromAlarmMuteRuleName

      @Stability(Stable) @NotNull public static IAlarmMuteRule fromAlarmMuteRuleName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String alarmMuteRuleName)
      Import an existing CloudWatch alarm mute rule provided an Name.

      Parameters:
      scope - The parent creating construct (usually this). This parameter is required.
      id - The construct's name. This parameter is required.
      alarmMuteRuleName - Alarm Mute Rule Name. This parameter is required.
    • addAlarm

      @Stability(Stable) public void addAlarm(@NotNull IAlarmRef alarm)
      Add a CloudWatch alarm to mute rule target alarms.

      Parameters:
      alarm - This parameter is required.
    • getAlarmMuteRuleArn

      @Stability(Stable) @NotNull public String getAlarmMuteRuleArn()
      ARN of this alarm mute rule.
      Specified by:
      getAlarmMuteRuleArn in interface IAlarmMuteRule
    • getAlarmMuteRuleName

      @Stability(Stable) @NotNull public String getAlarmMuteRuleName()
      Name of this alarm mute rule.
      Specified by:
      getAlarmMuteRuleName in interface IAlarmMuteRule
    • getAlarmMuteRuleRef

      @Stability(Stable) @NotNull public AlarmMuteRuleReference getAlarmMuteRuleRef()
      A reference to a AlarmMuteRule resource.
      Specified by:
      getAlarmMuteRuleRef in interface IAlarmMuteRuleRef