Interface ICreateAlarmOptions
Properties needed to make an alarm from a metric.
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICreateAlarmOptions
Syntax (vb)
Public Interface ICreateAlarmOptions
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CloudWatch;
HostedZone myHostedZone;
var certificate = new Certificate(this, "Certificate", new CertificateProps {
DomainName = "hello.example.com",
Validation = CertificateValidation.FromDns(myHostedZone)
});
certificate.MetricDaysToExpiry().CreateAlarm(this, "Alarm", new CreateAlarmOptions {
ComparisonOperator = ComparisonOperator.LESS_THAN_THRESHOLD,
EvaluationPeriods = 1,
Threshold = 45
});
Synopsis
Properties
ActionsEnabled | Whether the actions for this alarm are enabled. |
AlarmDescription | Description for the alarm. |
AlarmName | Name of the alarm. |
ComparisonOperator | Comparison to use to check if metric is breaching. |
DatapointsToAlarm | The number of datapoints that must be breaching to trigger the alarm. |
EvaluateLowSampleCountPercentile | Specifies whether to evaluate the data and potentially change the alarm state if there are too few data points to be statistically significant. |
EvaluationPeriods | The number of periods over which data is compared to the specified threshold. |
Threshold | The value against which the specified statistic is compared. |
TreatMissingData | Sets how this alarm is to handle missing data points. |
Properties
ActionsEnabled
Whether the actions for this alarm are enabled.
virtual Nullable<bool> ActionsEnabled { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
AlarmDescription
Description for the alarm.
virtual string AlarmDescription { get; }
Property Value
System.String
Remarks
Default: No description
AlarmName
Name of the alarm.
virtual string AlarmName { get; }
Property Value
System.String
Remarks
Default: Automatically generated name
ComparisonOperator
Comparison to use to check if metric is breaching.
virtual Nullable<ComparisonOperator> ComparisonOperator { get; }
Property Value
System.Nullable<ComparisonOperator>
Remarks
Default: GreaterThanOrEqualToThreshold
DatapointsToAlarm
The number of datapoints that must be breaching to trigger the alarm.
virtual Nullable<double> DatapointsToAlarm { get; }
Property Value
System.Nullable<System.Double>
Remarks
This is used only if you are setting an "M out of N" alarm. In that case, this value is the M. For more information, see Evaluating an Alarm in the Amazon CloudWatch User Guide.
Default: evaluationPeriods
EvaluateLowSampleCountPercentile
Specifies whether to evaluate the data and potentially change the alarm state if there are too few data points to be statistically significant.
virtual string EvaluateLowSampleCountPercentile { get; }
Property Value
System.String
Remarks
Used only for alarms that are based on percentiles.
Default: - Not configured.
EvaluationPeriods
The number of periods over which data is compared to the specified threshold.
double EvaluationPeriods { get; }
Property Value
System.Double
Threshold
The value against which the specified statistic is compared.
double Threshold { get; }
Property Value
System.Double
TreatMissingData
Sets how this alarm is to handle missing data points.
virtual Nullable<TreatMissingData> TreatMissingData { get; }
Property Value
System.Nullable<TreatMissingData>
Remarks
Default: TreatMissingData.Missing