Class PromQLAlarmProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.PromQLAlarmProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<PromQLAlarmProps>
- Enclosing interface:
PromQLAlarmProps
@Stability(Stable)
public static final class PromQLAlarmProps.Builder
extends Object
implements software.amazon.jsii.Builder<PromQLAlarmProps>
A builder for
PromQLAlarmProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactionsEnabled(Boolean actionsEnabled) Sets the value ofPromQLAlarmProps.getActionsEnabled()alarmDescription(String alarmDescription) Sets the value ofPromQLAlarmProps.getAlarmDescription()Sets the value ofPromQLAlarmProps.getAlarmName()build()Builds the configured instance.evaluationInterval(Duration evaluationInterval) Sets the value ofPromQLAlarmProps.getEvaluationInterval()pendingPeriod(Duration pendingPeriod) Sets the value ofPromQLAlarmProps.getPendingPeriod()Sets the value ofPromQLAlarmProps.getQuery()recoveryPeriod(Duration recoveryPeriod) Sets the value ofPromQLAlarmProps.getRecoveryPeriod()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
evaluationInterval
Sets the value ofPromQLAlarmProps.getEvaluationInterval()- Parameters:
evaluationInterval- The frequency at which the alarm is evaluated. This parameter is required. Must be between 10 seconds and 3600 seconds.- Returns:
this
-
query
Sets the value ofPromQLAlarmProps.getQuery()- Parameters:
query- The PromQL query that the alarm evaluates. This parameter is required.- Returns:
this
-
actionsEnabled
Sets the value ofPromQLAlarmProps.getActionsEnabled()- Parameters:
actionsEnabled- Whether the actions for this alarm are enabled.- Returns:
this
-
alarmDescription
Sets the value ofPromQLAlarmProps.getAlarmDescription()- Parameters:
alarmDescription- Description for the alarm.- Returns:
this
-
alarmName
Sets the value ofPromQLAlarmProps.getAlarmName()- Parameters:
alarmName- Name of the alarm.- Returns:
this
-
pendingPeriod
Sets the value ofPromQLAlarmProps.getPendingPeriod()- Parameters:
pendingPeriod- The duration that a contributor must continuously breach before the contributor transitions to ALARM state.- Returns:
this
-
recoveryPeriod
Sets the value ofPromQLAlarmProps.getRecoveryPeriod()- Parameters:
recoveryPeriod- The duration that a contributor must continuously not be breaching before it transitions back to the OK state.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PromQLAlarmProps>- Returns:
- a new instance of
PromQLAlarmProps - Throws:
NullPointerException- if any required attribute was not provided
-