Interface IAlarmProps
Properties for Alarms.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.AWS.CloudWatch.dll
Syntax (csharp)
public interface IAlarmProps : ICreateAlarmOptions
Syntax (vb)
Public Interface IAlarmProps
Inherits ICreateAlarmOptions
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CloudWatch;
Alias alias;
// or add alarms to an existing group
Alias blueGreenAlias;
var alarm = new Alarm(this, "Errors", new AlarmProps {
ComparisonOperator = ComparisonOperator.GREATER_THAN_THRESHOLD,
Threshold = 1,
EvaluationPeriods = 1,
Metric = alias.MetricErrors()
});
var deploymentGroup = new LambdaDeploymentGroup(this, "BlueGreenDeployment", new LambdaDeploymentGroupProps {
Alias = alias,
DeploymentConfig = LambdaDeploymentConfig.LINEAR_10PERCENT_EVERY_1MINUTE,
Alarms = new [] { alarm }
});
deploymentGroup.AddAlarm(new Alarm(this, "BlueGreenErrors", new AlarmProps {
ComparisonOperator = ComparisonOperator.GREATER_THAN_THRESHOLD,
Threshold = 1,
EvaluationPeriods = 1,
Metric = blueGreenAlias.MetricErrors()
}));
Synopsis
Properties
Metric | The metric to add the alarm on. |
Properties
Metric
The metric to add the alarm on.
IMetric Metric { get; }
Property Value
Remarks
Metric objects can be obtained from most resources, or you can construct custom Metric objects by instantiating one.