@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:51.314Z") @Stability(value=Stable) public enum TreatMissingData extends Enum<TreatMissingData>
Example:
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.services.cloudwatch.*;
Function fn = Function.Builder.create(this, "MyFunction")
.runtime(Runtime.NODEJS_16_X)
.handler("index.handler")
.code(Code.fromAsset(join(__dirname, "lambda-handler")))
.timeout(Duration.minutes(5))
.build();
if (fn.getTimeout()) {
Alarm.Builder.create(this, "MyAlarm")
.metric(fn.metricDuration().with(MetricOptions.builder()
.statistic("Maximum")
.build()))
.evaluationPeriods(1)
.datapointsToAlarm(1)
.threshold(fn.timeout.toMilliseconds())
.treatMissingData(TreatMissingData.IGNORE)
.alarmName("My Lambda Timeout")
.build();
}
| Enum Constant and Description |
|---|
BREACHING
Missing data points are treated as breaching the threshold.
|
IGNORE
The current alarm state is maintained.
|
MISSING
The alarm does not consider missing data points when evaluating whether to change state.
|
NOT_BREACHING
Missing data points are treated as being within the threshold.
|
| Modifier and Type | Method and Description |
|---|---|
static TreatMissingData |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TreatMissingData[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final TreatMissingData BREACHING
@Stability(value=Stable) public static final TreatMissingData NOT_BREACHING
@Stability(value=Stable) public static final TreatMissingData IGNORE
@Stability(value=Stable) public static final TreatMissingData MISSING
public static TreatMissingData[] values()
for (TreatMissingData c : TreatMissingData.values()) System.out.println(c);
public static TreatMissingData valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2023. All rights reserved.