Interface MetricAlarm.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<MetricAlarm.Builder,MetricAlarm>,SdkBuilder<MetricAlarm.Builder,MetricAlarm>,SdkPojo
- Enclosing class:
- MetricAlarm
public static interface MetricAlarm.Builder extends SdkPojo, CopyableBuilder<MetricAlarm.Builder,MetricAlarm>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MetricAlarm.BuilderactionsEnabled(Boolean actionsEnabled)Indicates whether actions should be executed during any changes to the alarm state.MetricAlarm.BuilderalarmActions(String... alarmActions)The actions to execute when this alarm transitions to theALARMstate from any other state.MetricAlarm.BuilderalarmActions(Collection<String> alarmActions)The actions to execute when this alarm transitions to theALARMstate from any other state.MetricAlarm.BuilderalarmArn(String alarmArn)The Amazon Resource Name (ARN) of the alarm.MetricAlarm.BuilderalarmConfigurationUpdatedTimestamp(Instant alarmConfigurationUpdatedTimestamp)The time stamp of the last update to the alarm configuration.MetricAlarm.BuilderalarmDescription(String alarmDescription)The description of the alarm.MetricAlarm.BuilderalarmName(String alarmName)The name of the alarm.MetricAlarm.BuildercomparisonOperator(String comparisonOperator)The arithmetic operation to use when comparing the specified statistic and threshold.MetricAlarm.BuildercomparisonOperator(ComparisonOperator comparisonOperator)The arithmetic operation to use when comparing the specified statistic and threshold.MetricAlarm.BuilderdatapointsToAlarm(Integer datapointsToAlarm)The number of data points that must be breaching to trigger the alarm.MetricAlarm.Builderdimensions(Collection<Dimension> dimensions)The dimensions for the metric associated with the alarm.MetricAlarm.Builderdimensions(Consumer<Dimension.Builder>... dimensions)The dimensions for the metric associated with the alarm.MetricAlarm.Builderdimensions(Dimension... dimensions)The dimensions for the metric associated with the alarm.MetricAlarm.BuilderevaluateLowSampleCountPercentile(String evaluateLowSampleCountPercentile)Used only for alarms based on percentiles.MetricAlarm.BuilderevaluationPeriods(Integer evaluationPeriods)The number of periods over which data is compared to the specified threshold.MetricAlarm.BuilderevaluationState(String evaluationState)If the value of this field isPARTIAL_DATA, the alarm is being evaluated based on only partial data.MetricAlarm.BuilderevaluationState(EvaluationState evaluationState)If the value of this field isPARTIAL_DATA, the alarm is being evaluated based on only partial data.MetricAlarm.BuilderextendedStatistic(String extendedStatistic)The percentile statistic for the metric associated with the alarm.MetricAlarm.BuilderinsufficientDataActions(String... insufficientDataActions)The actions to execute when this alarm transitions to theINSUFFICIENT_DATAstate from any other state.MetricAlarm.BuilderinsufficientDataActions(Collection<String> insufficientDataActions)The actions to execute when this alarm transitions to theINSUFFICIENT_DATAstate from any other state.MetricAlarm.BuildermetricName(String metricName)The name of the metric associated with the alarm, if this is an alarm based on a single metric.MetricAlarm.Buildermetrics(Collection<MetricDataQuery> metrics)An array of MetricDataQuery structures, used in an alarm based on a metric math expression.MetricAlarm.Buildermetrics(Consumer<MetricDataQuery.Builder>... metrics)An array of MetricDataQuery structures, used in an alarm based on a metric math expression.MetricAlarm.Buildermetrics(MetricDataQuery... metrics)An array of MetricDataQuery structures, used in an alarm based on a metric math expression.MetricAlarm.Buildernamespace(String namespace)The namespace of the metric associated with the alarm.MetricAlarm.BuilderokActions(String... okActions)The actions to execute when this alarm transitions to theOKstate from any other state.MetricAlarm.BuilderokActions(Collection<String> okActions)The actions to execute when this alarm transitions to theOKstate from any other state.MetricAlarm.Builderperiod(Integer period)The period, in seconds, over which the statistic is applied.MetricAlarm.BuilderstateReason(String stateReason)An explanation for the alarm state, in text format.MetricAlarm.BuilderstateReasonData(String stateReasonData)An explanation for the alarm state, in JSON format.MetricAlarm.BuilderstateTransitionedTimestamp(Instant stateTransitionedTimestamp)The date and time that the alarm'sStateValuemost recently changed.MetricAlarm.BuilderstateUpdatedTimestamp(Instant stateUpdatedTimestamp)The time stamp of the last update to the value of either theStateValueorEvaluationStateparameters.MetricAlarm.BuilderstateValue(String stateValue)The state value for the alarm.MetricAlarm.BuilderstateValue(StateValue stateValue)The state value for the alarm.MetricAlarm.Builderstatistic(String statistic)The statistic for the metric associated with the alarm, other than percentile.MetricAlarm.Builderstatistic(Statistic statistic)The statistic for the metric associated with the alarm, other than percentile.MetricAlarm.Builderthreshold(Double threshold)The value to compare with the specified statistic.MetricAlarm.BuilderthresholdMetricId(String thresholdMetricId)In an alarm based on an anomaly detection model, this is the ID of theANOMALY_DETECTION_BANDfunction used as the threshold for the alarm.MetricAlarm.BuildertreatMissingData(String treatMissingData)Sets how this alarm is to handle missing data points.MetricAlarm.Builderunit(String unit)The unit of the metric associated with the alarm.MetricAlarm.Builderunit(StandardUnit unit)The unit of the metric associated with the alarm.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
alarmName
MetricAlarm.Builder alarmName(String alarmName)
The name of the alarm.
- Parameters:
alarmName- The name of the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
alarmArn
MetricAlarm.Builder alarmArn(String alarmArn)
The Amazon Resource Name (ARN) of the alarm.
- Parameters:
alarmArn- The Amazon Resource Name (ARN) of the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
alarmDescription
MetricAlarm.Builder alarmDescription(String alarmDescription)
The description of the alarm.
- Parameters:
alarmDescription- The description of the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
alarmConfigurationUpdatedTimestamp
MetricAlarm.Builder alarmConfigurationUpdatedTimestamp(Instant alarmConfigurationUpdatedTimestamp)
The time stamp of the last update to the alarm configuration.
- Parameters:
alarmConfigurationUpdatedTimestamp- The time stamp of the last update to the alarm configuration.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
actionsEnabled
MetricAlarm.Builder actionsEnabled(Boolean actionsEnabled)
Indicates whether actions should be executed during any changes to the alarm state.
- Parameters:
actionsEnabled- Indicates whether actions should be executed during any changes to the alarm state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
okActions
MetricAlarm.Builder okActions(Collection<String> okActions)
The actions to execute when this alarm transitions to the
OKstate from any other state. Each action is specified as an Amazon Resource Name (ARN).- Parameters:
okActions- The actions to execute when this alarm transitions to theOKstate from any other state. Each action is specified as an Amazon Resource Name (ARN).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
okActions
MetricAlarm.Builder okActions(String... okActions)
The actions to execute when this alarm transitions to the
OKstate from any other state. Each action is specified as an Amazon Resource Name (ARN).- Parameters:
okActions- The actions to execute when this alarm transitions to theOKstate from any other state. Each action is specified as an Amazon Resource Name (ARN).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
alarmActions
MetricAlarm.Builder alarmActions(Collection<String> alarmActions)
The actions to execute when this alarm transitions to the
ALARMstate from any other state. Each action is specified as an Amazon Resource Name (ARN).- Parameters:
alarmActions- The actions to execute when this alarm transitions to theALARMstate from any other state. Each action is specified as an Amazon Resource Name (ARN).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
alarmActions
MetricAlarm.Builder alarmActions(String... alarmActions)
The actions to execute when this alarm transitions to the
ALARMstate from any other state. Each action is specified as an Amazon Resource Name (ARN).- Parameters:
alarmActions- The actions to execute when this alarm transitions to theALARMstate from any other state. Each action is specified as an Amazon Resource Name (ARN).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
insufficientDataActions
MetricAlarm.Builder insufficientDataActions(Collection<String> insufficientDataActions)
The actions to execute when this alarm transitions to the
INSUFFICIENT_DATAstate from any other state. Each action is specified as an Amazon Resource Name (ARN).- Parameters:
insufficientDataActions- The actions to execute when this alarm transitions to theINSUFFICIENT_DATAstate from any other state. Each action is specified as an Amazon Resource Name (ARN).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
insufficientDataActions
MetricAlarm.Builder insufficientDataActions(String... insufficientDataActions)
The actions to execute when this alarm transitions to the
INSUFFICIENT_DATAstate from any other state. Each action is specified as an Amazon Resource Name (ARN).- Parameters:
insufficientDataActions- The actions to execute when this alarm transitions to theINSUFFICIENT_DATAstate from any other state. Each action is specified as an Amazon Resource Name (ARN).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
stateValue
MetricAlarm.Builder stateValue(String stateValue)
The state value for the alarm.
- Parameters:
stateValue- The state value for the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
StateValue,StateValue
-
stateValue
MetricAlarm.Builder stateValue(StateValue stateValue)
The state value for the alarm.
- Parameters:
stateValue- The state value for the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
StateValue,StateValue
-
stateReason
MetricAlarm.Builder stateReason(String stateReason)
An explanation for the alarm state, in text format.
- Parameters:
stateReason- An explanation for the alarm state, in text format.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
stateReasonData
MetricAlarm.Builder stateReasonData(String stateReasonData)
An explanation for the alarm state, in JSON format.
- Parameters:
stateReasonData- An explanation for the alarm state, in JSON format.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
stateUpdatedTimestamp
MetricAlarm.Builder stateUpdatedTimestamp(Instant stateUpdatedTimestamp)
The time stamp of the last update to the value of either the
StateValueorEvaluationStateparameters.- Parameters:
stateUpdatedTimestamp- The time stamp of the last update to the value of either theStateValueorEvaluationStateparameters.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metricName
MetricAlarm.Builder metricName(String metricName)
The name of the metric associated with the alarm, if this is an alarm based on a single metric.
- Parameters:
metricName- The name of the metric associated with the alarm, if this is an alarm based on a single metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
namespace
MetricAlarm.Builder namespace(String namespace)
The namespace of the metric associated with the alarm.
- Parameters:
namespace- The namespace of the metric associated with the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
statistic
MetricAlarm.Builder statistic(String statistic)
The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use
ExtendedStatistic.
-
statistic
MetricAlarm.Builder statistic(Statistic statistic)
The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use
ExtendedStatistic.
-
extendedStatistic
MetricAlarm.Builder extendedStatistic(String extendedStatistic)
The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- Parameters:
extendedStatistic- The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dimensions
MetricAlarm.Builder dimensions(Collection<Dimension> dimensions)
The dimensions for the metric associated with the alarm.
- Parameters:
dimensions- The dimensions for the metric associated with the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dimensions
MetricAlarm.Builder dimensions(Dimension... dimensions)
The dimensions for the metric associated with the alarm.
- Parameters:
dimensions- The dimensions for the metric associated with the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dimensions
MetricAlarm.Builder dimensions(Consumer<Dimension.Builder>... dimensions)
The dimensions for the metric associated with the alarm.
This is a convenience method that creates an instance of theDimension.Builderavoiding the need to create one manually viaDimension.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#dimensions(List.) - Parameters:
dimensions- a consumer that will call methods onDimension.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#dimensions(java.util.Collection)
-
period
MetricAlarm.Builder period(Integer period)
The period, in seconds, over which the statistic is applied.
- Parameters:
period- The period, in seconds, over which the statistic is applied.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
unit
MetricAlarm.Builder unit(String unit)
The unit of the metric associated with the alarm.
- Parameters:
unit- The unit of the metric associated with the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
StandardUnit,StandardUnit
-
unit
MetricAlarm.Builder unit(StandardUnit unit)
The unit of the metric associated with the alarm.
- Parameters:
unit- The unit of the metric associated with the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
StandardUnit,StandardUnit
-
evaluationPeriods
MetricAlarm.Builder evaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold.
- Parameters:
evaluationPeriods- The number of periods over which data is compared to the specified threshold.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
datapointsToAlarm
MetricAlarm.Builder datapointsToAlarm(Integer datapointsToAlarm)
The number of data points that must be breaching to trigger the alarm.
- Parameters:
datapointsToAlarm- The number of data points that must be breaching to trigger the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
threshold
MetricAlarm.Builder threshold(Double threshold)
The value to compare with the specified statistic.
- Parameters:
threshold- The value to compare with the specified statistic.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
comparisonOperator
MetricAlarm.Builder comparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
- Parameters:
comparisonOperator- The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ComparisonOperator,ComparisonOperator
-
comparisonOperator
MetricAlarm.Builder comparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
- Parameters:
comparisonOperator- The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ComparisonOperator,ComparisonOperator
-
treatMissingData
MetricAlarm.Builder treatMissingData(String treatMissingData)
Sets how this alarm is to handle missing data points. The valid values are
breaching,notBreaching,ignore, andmissing. For more information, see Configuring how CloudWatch alarms treat missing data.If this parameter is omitted, the default behavior of
missingis used.- Parameters:
treatMissingData- Sets how this alarm is to handle missing data points. The valid values arebreaching,notBreaching,ignore, andmissing. For more information, see Configuring how CloudWatch alarms treat missing data.If this parameter is omitted, the default behavior of
missingis used.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
evaluateLowSampleCountPercentile
MetricAlarm.Builder evaluateLowSampleCountPercentile(String evaluateLowSampleCountPercentile)
Used only for alarms based on percentiles. If
ignore, the alarm state does not change during periods with too few data points to be statistically significant. Ifevaluateor this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available.- Parameters:
evaluateLowSampleCountPercentile- Used only for alarms based on percentiles. Ifignore, the alarm state does not change during periods with too few data points to be statistically significant. Ifevaluateor this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metrics
MetricAlarm.Builder metrics(Collection<MetricDataQuery> metrics)
An array of MetricDataQuery structures, used in an alarm based on a metric math expression. Each structure either retrieves a metric or performs a math expression. One item in the Metrics array is the math expression that the alarm watches. This expression by designated by having
ReturnDataset to true.- Parameters:
metrics- An array of MetricDataQuery structures, used in an alarm based on a metric math expression. Each structure either retrieves a metric or performs a math expression. One item in the Metrics array is the math expression that the alarm watches. This expression by designated by havingReturnDataset to true.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metrics
MetricAlarm.Builder metrics(MetricDataQuery... metrics)
An array of MetricDataQuery structures, used in an alarm based on a metric math expression. Each structure either retrieves a metric or performs a math expression. One item in the Metrics array is the math expression that the alarm watches. This expression by designated by having
ReturnDataset to true.- Parameters:
metrics- An array of MetricDataQuery structures, used in an alarm based on a metric math expression. Each structure either retrieves a metric or performs a math expression. One item in the Metrics array is the math expression that the alarm watches. This expression by designated by havingReturnDataset to true.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metrics
MetricAlarm.Builder metrics(Consumer<MetricDataQuery.Builder>... metrics)
An array of MetricDataQuery structures, used in an alarm based on a metric math expression. Each structure either retrieves a metric or performs a math expression. One item in the Metrics array is the math expression that the alarm watches. This expression by designated by having
This is a convenience method that creates an instance of theReturnDataset to true.MetricDataQuery.Builderavoiding the need to create one manually viaMetricDataQuery.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#metrics(List.) - Parameters:
metrics- a consumer that will call methods onMetricDataQuery.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#metrics(java.util.Collection)
-
thresholdMetricId
MetricAlarm.Builder thresholdMetricId(String thresholdMetricId)
In an alarm based on an anomaly detection model, this is the ID of the
ANOMALY_DETECTION_BANDfunction used as the threshold for the alarm.- Parameters:
thresholdMetricId- In an alarm based on an anomaly detection model, this is the ID of theANOMALY_DETECTION_BANDfunction used as the threshold for the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
evaluationState
MetricAlarm.Builder evaluationState(String evaluationState)
If the value of this field is
PARTIAL_DATA, the alarm is being evaluated based on only partial data. This happens if the query used for the alarm returns more than 10,000 metrics. For more information, see Create alarms on Metrics Insights queries.- Parameters:
evaluationState- If the value of this field isPARTIAL_DATA, the alarm is being evaluated based on only partial data. This happens if the query used for the alarm returns more than 10,000 metrics. For more information, see Create alarms on Metrics Insights queries.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
EvaluationState,EvaluationState
-
evaluationState
MetricAlarm.Builder evaluationState(EvaluationState evaluationState)
If the value of this field is
PARTIAL_DATA, the alarm is being evaluated based on only partial data. This happens if the query used for the alarm returns more than 10,000 metrics. For more information, see Create alarms on Metrics Insights queries.- Parameters:
evaluationState- If the value of this field isPARTIAL_DATA, the alarm is being evaluated based on only partial data. This happens if the query used for the alarm returns more than 10,000 metrics. For more information, see Create alarms on Metrics Insights queries.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
EvaluationState,EvaluationState
-
stateTransitionedTimestamp
MetricAlarm.Builder stateTransitionedTimestamp(Instant stateTransitionedTimestamp)
The date and time that the alarm's
StateValuemost recently changed.- Parameters:
stateTransitionedTimestamp- The date and time that the alarm'sStateValuemost recently changed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-