Interface IMetricOptions
Properties of a metric that can be changed.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.AWS.CloudWatch.dll
Syntax (csharp)
public interface IMetricOptions : ICommonMetricOptions
Syntax (vb)
Public Interface IMetricOptions
Inherits ICommonMetricOptions
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CloudWatch;
DeliveryStream deliveryStream;
// Alarm that triggers when the per-second average of incoming bytes exceeds 90% of the current service limit
var incomingBytesPercentOfLimit = new MathExpression(new MathExpressionProps {
Expression = "incomingBytes / 300 / bytePerSecLimit",
UsingMetrics = new Dictionary<string, IMetric> {
{ "incomingBytes", deliveryStream.MetricIncomingBytes(new MetricOptions { Statistic = Statistic.SUM }) },
{ "bytePerSecLimit", deliveryStream.Metric("BytesPerSecondLimit") }
}
});
new Alarm(this, "Alarm", new AlarmProps {
Metric = incomingBytesPercentOfLimit,
Threshold = 0.9,
EvaluationPeriods = 3
});