Class AlarmRule
Class with static functions to build AlarmRule for Composite Alarms.
Inheritance
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.AWS.CloudWatch.dll
Syntax (csharp)
public class AlarmRule : DeputyBase
Syntax (vb)
Public Class AlarmRule
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
Alarm alarm1;
Alarm alarm2;
Alarm alarm3;
Alarm alarm4;
var alarmRule = AlarmRule.AnyOf(AlarmRule.AllOf(AlarmRule.AnyOf(alarm1, AlarmRule.FromAlarm(alarm2, AlarmState.OK), alarm3), AlarmRule.Not(AlarmRule.FromAlarm(alarm4, AlarmState.INSUFFICIENT_DATA))), AlarmRule.FromBoolean(false));
new CompositeAlarm(this, "MyAwesomeCompositeAlarm", new CompositeAlarmProps {
AlarmRule = alarmRule
});
Synopsis
Constructors
AlarmRule() | |
AlarmRule(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
AlarmRule(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
AllOf(IAlarmRule[]) | function to join all provided AlarmRules with AND operator. |
AnyOf(IAlarmRule[]) | function to join all provided AlarmRules with OR operator. |
FromAlarm(IAlarm, AlarmState) | function to build Rule Expression for given IAlarm and AlarmState. |
FromBoolean(Boolean) | function to build TRUE/FALSE intent for Rule Expression. |
FromString(String) | function to build Rule Expression for given Alarm Rule string. |
Not(IAlarmRule) | function to wrap provided AlarmRule in NOT operator. |
Constructors
AlarmRule()
public AlarmRule()
AlarmRule(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected AlarmRule(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
AlarmRule(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected AlarmRule(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
AllOf(IAlarmRule[])
function to join all provided AlarmRules with AND operator.
public static IAlarmRule AllOf(params IAlarmRule[] operands)
Parameters
- operands IAlarmRule[]
IAlarmRules to be joined with AND operator.
Returns
AnyOf(IAlarmRule[])
function to join all provided AlarmRules with OR operator.
public static IAlarmRule AnyOf(params IAlarmRule[] operands)
Parameters
- operands IAlarmRule[]
IAlarmRules to be joined with OR operator.
Returns
FromAlarm(IAlarm, AlarmState)
function to build Rule Expression for given IAlarm and AlarmState.
public static IAlarmRule FromAlarm(IAlarm alarm, AlarmState alarmState)
Parameters
- alarm IAlarm
IAlarm to be used in Rule Expression.
- alarmState AlarmState
AlarmState to be used in Rule Expression.
Returns
FromBoolean(Boolean)
function to build TRUE/FALSE intent for Rule Expression.
public static IAlarmRule FromBoolean(bool value)
Parameters
- value System.Boolean
boolean value to be used in rule expression.
Returns
FromString(String)
function to build Rule Expression for given Alarm Rule string.
public static IAlarmRule FromString(string alarmRule)
Parameters
- alarmRule System.String
string to be used in Rule Expression.
Returns
Not(IAlarmRule)
function to wrap provided AlarmRule in NOT operator.
public static IAlarmRule Not(IAlarmRule operand)
Parameters
- operand IAlarmRule
IAlarmRule to be wrapped in NOT operator.
Returns