Class CompositeAlarm

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.cloudwatch.AlarmBase
software.amazon.awscdk.services.cloudwatch.CompositeAlarm
All Implemented Interfaces:
IResource, IAlarm, IAlarmRule, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-17T21:37:27.841Z") @Stability(Stable) public class CompositeAlarm extends AlarmBase
A Composite Alarm based on Alarm Rule.

Example:

 Alarm alarm1;
 Alarm alarm2;
 Alarm alarm3;
 Alarm alarm4;
 IAlarmRule alarmRule = AlarmRule.anyOf(AlarmRule.allOf(AlarmRule.anyOf(alarm1, AlarmRule.fromAlarm(alarm2, AlarmState.OK), alarm3), AlarmRule.not(AlarmRule.fromAlarm(alarm4, AlarmState.INSUFFICIENT_DATA))), AlarmRule.fromBoolean(false));
 CompositeAlarm.Builder.create(this, "MyAwesomeCompositeAlarm")
         .alarmRule(alarmRule)
         .build();
 
  • Constructor Details

    • CompositeAlarm

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

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

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

    • fromCompositeAlarmArn

      @Stability(Stable) @NotNull public static IAlarm fromCompositeAlarmArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String compositeAlarmArn)
      Import an existing CloudWatch composite alarm provided an ARN.

      Parameters:
      scope - The parent creating construct (usually this). This parameter is required.
      id - The construct's name. This parameter is required.
      compositeAlarmArn - Composite Alarm ARN (i.e. arn:aws:cloudwatch::invalid input: '<'account-id>:alarm:CompositeAlarmName). This parameter is required.
    • fromCompositeAlarmName

      @Stability(Stable) @NotNull public static IAlarm fromCompositeAlarmName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String compositeAlarmName)
      Import an existing CloudWatch composite alarm provided an Name.

      Parameters:
      scope - The parent creating construct (usually this). This parameter is required.
      id - The construct's name. This parameter is required.
      compositeAlarmName - Composite Alarm Name. This parameter is required.
    • getAlarmArn

      @Stability(Stable) @NotNull public String getAlarmArn()
      ARN of this alarm.
      Specified by:
      getAlarmArn in interface IAlarm
      Specified by:
      getAlarmArn in class AlarmBase
    • getAlarmName

      @Stability(Stable) @NotNull public String getAlarmName()
      Name of this alarm.
      Specified by:
      getAlarmName in interface IAlarm
      Specified by:
      getAlarmName in class AlarmBase