Class CompositeAlarm
A Composite Alarm based on Alarm Rule.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CompositeAlarm : AlarmBase, IAlarm, IAlarmRule, IResource
Syntax (vb)
Public Class CompositeAlarm
Inherits AlarmBase
Implements IAlarm, IAlarmRule, IResource
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
CompositeAlarm(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CompositeAlarm(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CompositeAlarm(Construct, String, ICompositeAlarmProps) |
Properties
AlarmArn | ARN of this alarm. |
AlarmName | Name of this alarm. |
Methods
FromCompositeAlarmArn(Construct, String, String) | Import an existing CloudWatch composite alarm provided an ARN. |
FromCompositeAlarmName(Construct, String, String) | Import an existing CloudWatch composite alarm provided an Name. |
Constructors
CompositeAlarm(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CompositeAlarm(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CompositeAlarm(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CompositeAlarm(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CompositeAlarm(Construct, String, ICompositeAlarmProps)
public CompositeAlarm(Construct scope, string id, ICompositeAlarmProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ICompositeAlarmProps
Properties
AlarmArn
ARN of this alarm.
public override string AlarmArn { get; }
Property Value
System.String
Overrides
Remarks
Attribute: true
AlarmName
Name of this alarm.
public override string AlarmName { get; }
Property Value
System.String
Overrides
Remarks
Attribute: true
Methods
FromCompositeAlarmArn(Construct, String, String)
Import an existing CloudWatch composite alarm provided an ARN.
public static IAlarm FromCompositeAlarmArn(Construct scope, string id, string compositeAlarmArn)
Parameters
- scope Constructs.Construct
The parent creating construct (usually
this
).- id System.String
The construct's name.
- compositeAlarmArn System.String
Composite Alarm ARN (i.e. arn:aws:cloudwatch:<region>:<account-id>:alarm:CompositeAlarmName).
Returns
FromCompositeAlarmName(Construct, String, String)
Import an existing CloudWatch composite alarm provided an Name.
public static IAlarm FromCompositeAlarmName(Construct scope, string id, string compositeAlarmName)
Parameters
- scope Constructs.Construct
The parent creating construct (usually
this
).- id System.String
The construct's name.
- compositeAlarmName System.String
Composite Alarm Name.
Returns