| Modifier and Type | Method and Description |
|---|---|
CfnAlarm.Builder |
actionsEnabled(Boolean actionsEnabled)
Indicates whether actions should be executed during any changes to the alarm state.
|
CfnAlarm.Builder |
actionsEnabled(IResolvable actionsEnabled)
Indicates whether actions should be executed during any changes to the alarm state.
|
CfnAlarm.Builder |
alarmActions(List<String> alarmActions)
The list of actions to execute when this alarm transitions into an ALARM state from any other state.
|
CfnAlarm.Builder |
alarmDescription(String alarmDescription)
The description of the alarm.
|
CfnAlarm.Builder |
alarmName(String alarmName)
The name of the alarm.
|
CfnAlarm |
build() |
CfnAlarm.Builder |
comparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified statistic and threshold.
|
static CfnAlarm.Builder |
create(software.constructs.Construct scope,
String id) |
CfnAlarm.Builder |
datapointsToAlarm(Number datapointsToAlarm)
The number of datapoints that must be breaching to trigger the alarm.
|
CfnAlarm.Builder |
dimensions(IResolvable dimensions)
The dimensions for the metric associated with the alarm.
|
CfnAlarm.Builder |
dimensions(List<? extends Object> dimensions)
The dimensions for the metric associated with the alarm.
|
CfnAlarm.Builder |
evaluateLowSampleCountPercentile(String evaluateLowSampleCountPercentile)
Used only for alarms based on percentiles.
|
CfnAlarm.Builder |
evaluationPeriods(Number evaluationPeriods)
The number of periods over which data is compared to the specified threshold.
|
CfnAlarm.Builder |
extendedStatistic(String extendedStatistic)
The percentile statistic for the metric associated with the alarm.
|
CfnAlarm.Builder |
insufficientDataActions(List<String> insufficientDataActions)
The actions to execute when this alarm transitions to the `INSUFFICIENT_DATA` state from any other state.
|
CfnAlarm.Builder |
metricName(String metricName)
The name of the metric associated with the alarm.
|
CfnAlarm.Builder |
metrics(IResolvable metrics)
An array that enables you to create an alarm based on the result of a metric math expression.
|
CfnAlarm.Builder |
metrics(List<? extends Object> metrics)
An array that enables you to create an alarm based on the result of a metric math expression.
|
CfnAlarm.Builder |
namespace(String namespace)
The namespace of the metric associated with the alarm.
|
CfnAlarm.Builder |
okActions(List<String> okActions)
The actions to execute when this alarm transitions to the `OK` state from any other state.
|
CfnAlarm.Builder |
period(Number period)
The period, in seconds, over which the statistic is applied.
|
CfnAlarm.Builder |
statistic(String statistic)
The statistic for the metric associated with the alarm, other than percentile.
|
CfnAlarm.Builder |
threshold(Number threshold)
The value to compare with the specified statistic.
|
CfnAlarm.Builder |
thresholdMetricId(String thresholdMetricId)
In an alarm based on an anomaly detection model, this is the ID of the `ANOMALY_DETECTION_BAND` function used as the threshold for the alarm.
|
CfnAlarm.Builder |
treatMissingData(String treatMissingData)
Sets how this alarm is to handle missing data points.
|
CfnAlarm.Builder |
unit(String unit)
The unit of the metric associated with the alarm.
|
@Stability(value=Stable) public static CfnAlarm.Builder create(software.constructs.Construct scope, String id)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.CfnAlarm.DimensionProperty.Builder.@Stability(value=Stable) public CfnAlarm.Builder comparisonOperator(String comparisonOperator)
The specified statistic value is used as the first operand.
You can specify the following values: GreaterThanThreshold , GreaterThanOrEqualToThreshold , LessThanThreshold , or LessThanOrEqualToThreshold .
comparisonOperator - The arithmetic operation to use when comparing the specified statistic and threshold. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder evaluationPeriods(Number evaluationPeriods)
If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N, and DatapointsToAlarm is the M.
For more information, see Evaluating an Alarm in the Amazon CloudWatch User Guide .
evaluationPeriods - The number of periods over which data is compared to the specified threshold. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder actionsEnabled(Boolean actionsEnabled)
The default is TRUE.
actionsEnabled - Indicates whether actions should be executed during any changes to the alarm state. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder actionsEnabled(IResolvable actionsEnabled)
The default is TRUE.
actionsEnabled - Indicates whether actions should be executed during any changes to the alarm state. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder alarmActions(List<String> alarmActions)
Specify each action as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutMetricAlarm in the Amazon CloudWatch API Reference .
alarmActions - The list of actions to execute when this alarm transitions into an ALARM state from any other state. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder alarmDescription(String alarmDescription)
alarmDescription - The description of the alarm. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder alarmName(String alarmName)
If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the alarm name.
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
alarmName - The name of the alarm. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder datapointsToAlarm(Number datapointsToAlarm)
This is used only if you are setting an "M out of N" alarm. In that case, this value is the M, and the value that you set for EvaluationPeriods is the N value. For more information, see Evaluating an Alarm in the Amazon CloudWatch User Guide .
If you omit this parameter, CloudWatch uses the same value here that you set for EvaluationPeriods , and the alarm goes to alarm state if that many consecutive periods are breaching.
datapointsToAlarm - The number of datapoints that must be breaching to trigger the alarm. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder dimensions(IResolvable dimensions)
For an alarm based on a math expression, you can't specify Dimensions . Instead, you use Metrics .
dimensions - The dimensions for the metric associated with the alarm. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder dimensions(List<? extends Object> dimensions)
For an alarm based on a math expression, you can't specify Dimensions . Instead, you use Metrics .
dimensions - The dimensions for the metric associated with the alarm. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder evaluateLowSampleCountPercentile(String evaluateLowSampleCountPercentile)
If ignore , the alarm state does not change during periods with too few data points to be statistically significant. If evaluate or this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available.
evaluateLowSampleCountPercentile - Used only for alarms based on percentiles. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder extendedStatistic(String extendedStatistic)
For an alarm based on a metric, you must specify either Statistic or ExtendedStatistic but not both.
For an alarm based on a math expression, you can't specify ExtendedStatistic . Instead, you use Metrics .
extendedStatistic - The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder insufficientDataActions(List<String> insufficientDataActions)
Each action is specified as an Amazon Resource Name (ARN).
insufficientDataActions - The actions to execute when this alarm transitions to the `INSUFFICIENT_DATA` state from any other state. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder metricName(String metricName)
This is required for an alarm based on a metric. For an alarm based on a math expression, you use Metrics instead and you can't specify MetricName .
metricName - The name of the metric associated with the alarm. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder metrics(IResolvable metrics)
Each item in the array either retrieves a metric or performs a math expression.
If you specify the Metrics parameter, you cannot specify MetricName , Dimensions , Period , Namespace , Statistic , ExtendedStatistic , or Unit .
metrics - An array that enables you to create an alarm based on the result of a metric math expression. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder metrics(List<? extends Object> metrics)
Each item in the array either retrieves a metric or performs a math expression.
If you specify the Metrics parameter, you cannot specify MetricName , Dimensions , Period , Namespace , Statistic , ExtendedStatistic , or Unit .
metrics - An array that enables you to create an alarm based on the result of a metric math expression. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder namespace(String namespace)
This is required for an alarm based on a metric. For an alarm based on a math expression, you can't specify Namespace and you use Metrics instead.
For a list of namespaces for metrics from AWS services, see AWS Services That Publish CloudWatch Metrics.
namespace - The namespace of the metric associated with the alarm. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder okActions(List<String> okActions)
Each action is specified as an Amazon Resource Name (ARN).
okActions - The actions to execute when this alarm transitions to the `OK` state from any other state. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder period(Number period)
This is required for an alarm based on a metric. Valid values are 10, 30, 60, and any multiple of 60.
For an alarm based on a math expression, you can't specify Period , and instead you use the Metrics parameter.
Minimum: 10
period - The period, in seconds, over which the statistic is applied. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder statistic(String statistic)
For an alarm based on a metric, you must specify either Statistic or ExtendedStatistic but not both.
For an alarm based on a math expression, you can't specify Statistic . Instead, you use Metrics .
statistic - The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use `ExtendedStatistic` . This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder threshold(Number threshold)
threshold - The value to compare with the specified statistic. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder thresholdMetricId(String thresholdMetricId)
thresholdMetricId - In an alarm based on an anomaly detection model, this is the ID of the `ANOMALY_DETECTION_BAND` function used as the threshold for the alarm. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder treatMissingData(String treatMissingData)
Valid values are breaching , notBreaching , ignore , and missing . For more information, see Configuring How CloudWatch Alarms Treat Missing Data in the Amazon CloudWatch User Guide .
If you omit this parameter, the default behavior of missing is used.
treatMissingData - Sets how this alarm is to handle missing data points. This parameter is required.this@Stability(value=Stable) public CfnAlarm.Builder unit(String unit)
Specify this only if you are creating an alarm based on a single metric. Do not specify this if you are specifying a Metrics array.
You can specify the following values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, or None.
unit - The unit of the metric associated with the alarm. This parameter is required.thisCopyright © 2022. All rights reserved.