Class CfnCompositeAlarm
The AWS::CloudWatch::CompositeAlarm
type creates or updates a composite alarm.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnCompositeAlarm : CfnResource, IInspectable, ITaggableV2
Syntax (vb)
Public Class CfnCompositeAlarm
Inherits CfnResource
Implements IInspectable, ITaggableV2
Remarks
When you create a composite alarm, you specify a rule expression for the alarm that takes into account the alarm states of other alarms that you have created. The composite alarm goes into ALARM state only if all conditions of the rule are met.
The alarms specified in a composite alarm's rule expression can include metric alarms and other composite alarms.
Using composite alarms can reduce alarm noise. You can create multiple metric alarms, and also create a composite alarm and set up alerts only for the composite alarm. For example, you could create a composite alarm that goes into ALARM state only when more than one of the underlying metric alarms are in ALARM state.
When this operation creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA. The alarm is then evaluated and its state is set appropriately. Any actions associated with the new state are then executed. For a composite alarm, this initial time after creation is the only time that the alarm can be in INSUFFICIENT_DATA state.
When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm.
CloudformationResource: AWS::CloudWatch::CompositeAlarm
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudWatch;
var cfnCompositeAlarm = new CfnCompositeAlarm(this, "MyCfnCompositeAlarm", new CfnCompositeAlarmProps {
AlarmRule = "alarmRule",
// the properties below are optional
ActionsEnabled = false,
ActionsSuppressor = "actionsSuppressor",
ActionsSuppressorExtensionPeriod = 123,
ActionsSuppressorWaitPeriod = 123,
AlarmActions = new [] { "alarmActions" },
AlarmDescription = "alarmDescription",
AlarmName = "alarmName",
InsufficientDataActions = new [] { "insufficientDataActions" },
OkActions = new [] { "okActions" },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnCompositeAlarm(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnCompositeAlarm(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnCompositeAlarm(Construct, String, ICfnCompositeAlarmProps) |
Properties
ActionsEnabled | Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. |
ActionsSuppressor | Actions will be suppressed if the suppressor alarm is in the |
ActionsSuppressorExtensionPeriod | The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the |
ActionsSuppressorWaitPeriod | The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the |
AlarmActions | The actions to execute when this alarm transitions to the ALARM state from any other state. |
AlarmDescription | The description for the composite alarm. |
AlarmName | The name for the composite alarm. |
AlarmRule | An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. |
AttrArn | The ARN of the composite alarm, such as |
CdkTagManager | Tag Manager which manages the tags for this resource. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
InsufficientDataActions | The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. |
OkActions | The actions to execute when this alarm transitions to the OK state from any other state. |
Tags | A list of key-value pairs to associate with the alarm. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnCompositeAlarm(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnCompositeAlarm(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnCompositeAlarm(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnCompositeAlarm(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnCompositeAlarm(Construct, String, ICfnCompositeAlarmProps)
public CfnCompositeAlarm(Construct scope, string id, ICfnCompositeAlarmProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnCompositeAlarmProps
Resource properties.
Properties
ActionsEnabled
Indicates whether actions should be executed during any changes to the alarm state of the composite alarm.
public virtual object ActionsEnabled { get; set; }
Property Value
System.Object
ActionsSuppressor
Actions will be suppressed if the suppressor alarm is in the ALARM
state.
public virtual string ActionsSuppressor { get; set; }
Property Value
System.String
ActionsSuppressorExtensionPeriod
The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the ALARM
state.
public virtual Nullable<double> ActionsSuppressorExtensionPeriod { get; set; }
Property Value
System.Nullable<System.Double>
ActionsSuppressorWaitPeriod
The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the ALARM
state.
public virtual Nullable<double> ActionsSuppressorWaitPeriod { get; set; }
Property Value
System.Nullable<System.Double>
AlarmActions
The actions to execute when this alarm transitions to the ALARM state from any other state.
public virtual string[] AlarmActions { get; set; }
Property Value
System.String[]
AlarmDescription
The description for the composite alarm.
public virtual string AlarmDescription { get; set; }
Property Value
System.String
AlarmName
The name for the composite alarm.
public virtual string AlarmName { get; set; }
Property Value
System.String
AlarmRule
An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state.
public virtual string AlarmRule { get; set; }
Property Value
System.String
AttrArn
The ARN of the composite alarm, such as arn:aws:cloudwatch:us-west-2:123456789012:alarm/CompositeAlarmName
.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
CdkTagManager
Tag Manager which manages the tags for this resource.
public virtual TagManager CdkTagManager { get; }
Property Value
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
InsufficientDataActions
The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
public virtual string[] InsufficientDataActions { get; set; }
Property Value
System.String[]
OkActions
The actions to execute when this alarm transitions to the OK state from any other state.
public virtual string[] OkActions { get; set; }
Property Value
System.String[]
Tags
A list of key-value pairs to associate with the alarm.
public virtual ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>