Class PromQLAlarm.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.PromQLAlarm.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<PromQLAlarm>
- Enclosing class:
PromQLAlarm
@Stability(Stable)
public static final class PromQLAlarm.Builder
extends Object
implements software.amazon.jsii.Builder<PromQLAlarm>
A fluent builder for
PromQLAlarm.-
Method Summary
Modifier and TypeMethodDescriptionactionsEnabled(Boolean actionsEnabled) Whether the actions for this alarm are enabled.alarmDescription(String alarmDescription) Description for the alarm.Name of the alarm.build()static PromQLAlarm.BuilderevaluationInterval(Duration evaluationInterval) The frequency at which the alarm is evaluated.pendingPeriod(Duration pendingPeriod) The duration that a contributor must continuously breach before the contributor transitions to ALARM state.The PromQL query that the alarm evaluates.recoveryPeriod(Duration recoveryPeriod) The duration that a contributor must continuously not be breaching before it transitions back to the OK state.
-
Method Details
-
create
@Stability(Stable) public static PromQLAlarm.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- This parameter is required.id- This parameter is required.- Returns:
- a new instance of
PromQLAlarm.Builder.
-
evaluationInterval
The frequency at which the alarm is evaluated.Must be between 10 seconds and 3600 seconds.
- Parameters:
evaluationInterval- The frequency at which the alarm is evaluated. This parameter is required.- Returns:
this
-
query
The PromQL query that the alarm evaluates.- Parameters:
query- The PromQL query that the alarm evaluates. This parameter is required.- Returns:
this
-
actionsEnabled
Whether the actions for this alarm are enabled.Default: true
- Parameters:
actionsEnabled- Whether the actions for this alarm are enabled. This parameter is required.- Returns:
this
-
alarmDescription
Description for the alarm.Default: - No description
- Parameters:
alarmDescription- Description for the alarm. This parameter is required.- Returns:
this
-
alarmName
Name of the alarm.Default: - Automatically generated name
- Parameters:
alarmName- Name of the alarm. This parameter is required.- Returns:
this
-
pendingPeriod
The duration that a contributor must continuously breach before the contributor transitions to ALARM state.Default: - No pending period
- Parameters:
pendingPeriod- The duration that a contributor must continuously breach before the contributor transitions to ALARM state. This parameter is required.- Returns:
this
-
recoveryPeriod
The duration that a contributor must continuously not be breaching before it transitions back to the OK state.Default: - No recovery period
- Parameters:
recoveryPeriod- The duration that a contributor must continuously not be breaching before it transitions back to the OK state. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PromQLAlarm>- Returns:
- a newly built instance of
PromQLAlarm.
-