Class PromQLAlarm

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.PromQLAlarm
All Implemented Interfaces:
IAlarmRef, IEnvironmentAware, IResource, IAlarm, IAlarmRule, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-13T16:55:05.343Z") @Stability(Stable) public class PromQLAlarm extends AlarmBase
A CloudWatch Alarm based on a PromQL query expression.

Example:

 PromQLAlarm.Builder.create(this, "HighLatencyAlarm")
         .alarmDescription("P99 latency exceeds 500ms for 5 minutes")
         .query("histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m])) > 0.5")
         .evaluationInterval(Duration.seconds(60))
         .pendingPeriod(Duration.seconds(300))
         .recoveryPeriod(Duration.seconds(600))
         .build();
 

See Also:
  • Field Details

    • PROPERTY_INJECTION_ID

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

    • PromQLAlarm

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

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

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

    • fromPromQLAlarmArn

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

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      alarmArn - This parameter is required.
    • fromPromQLAlarmName

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

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      alarmName - 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