CfnCompositeAlarmPropsMixin
- class aws_cdk.mixins_preview.aws_cloudwatch.mixins.CfnCompositeAlarmPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::CloudWatch::CompositeAlarmtype creates or updates a composite alarm.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.
- See:
- CloudformationResource:
AWS::CloudWatch::CompositeAlarm
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_cloudwatch import mixins as cloudwatch_mixins cfn_composite_alarm_props_mixin = cloudwatch_mixins.CfnCompositeAlarmPropsMixin(cloudwatch_mixins.CfnCompositeAlarmMixinProps( actions_enabled=False, actions_suppressor="actionsSuppressor", actions_suppressor_extension_period=123, actions_suppressor_wait_period=123, alarm_actions=["alarmActions"], alarm_description="alarmDescription", alarm_name="alarmName", alarm_rule="alarmRule", insufficient_data_actions=["insufficientDataActions"], ok_actions=["okActions"], tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::CloudWatch::CompositeAlarm.- Parameters:
props (
Union[CfnCompositeAlarmMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['actionsEnabled', 'actionsSuppressor', 'actionsSuppressorExtensionPeriod', 'actionsSuppressorWaitPeriod', 'alarmActions', 'alarmDescription', 'alarmName', 'alarmRule', 'insufficientDataActions', 'okActions', 'tags']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental