AWS::CloudWatch::CompositeAlarm¶
The AWS::CloudWatch::CompositeAlarm type specifies an alarm which aggregates the states of other Alarms (Metric or Composite Alarms) as defined by the AlarmR...
Generated by cfn-typegen --out cfn_types AWS::CloudWatch::CompositeAlarm into cfn_types/cloudwatch.py:
# Generated by cfn-typegen from the CloudFormation registry schemas. Do not edit.
# fmt: off
# ruff: noqa
"""AWS::CloudWatch resources."""
from collections.abc import Sequence
from typing import Any, Literal, NotRequired, Unpack
from typing_extensions import TypedDict
from cfn_typed.base import DeletionPolicy, DependsOn, ResourceAttrs, Tag, UpdateReplacePolicy, build
from cfn_typed.intrinsics import Expr
CONSTRAINTS:dict[str,Any]={
'AWS::CloudWatch::CompositeAlarm':{'Arn':{'l':1,'L':1600},'AlarmName':{'l':1,'L':255},'AlarmRule':{'l':1,'L':10240},'AlarmDescription':{'l':0,'L':1024},'OKActions':{'I':5,'T':{'l':1,'L':1024}},'AlarmActions':{'I':5,'T':{'l':1,'L':1024}},'InsufficientDataActions':{'I':5,'T':{'l':1,'L':1024}},'ActionsSuppressor':{'l':1,'L':1600},'ActionsSuppressorWaitPeriod':{'m':0},'ActionsSuppressorExtensionPeriod':{'m':0},'ActionConfiguration':{'P':{'AlarmTagsPropagation':{'P':{'IncludedTagKeys':{'i':1,'I':50,'T':{'l':1,'L':128}},'ExcludedTagKeys':{'i':1,'I':50,'T':{'l':1,'L':128}}}}}},'Tags':{'I':50,'T':{'P':{'Key':{'l':1,'L':128},'Value':{'l':1,'L':256}}}}},
}
ATTRIBUTES:dict[str,Any]={"AWS::CloudWatch::CompositeAlarm":["AlarmName","Arn"]}
RULES:dict[str,Any]={}
Nested types (5)
These are defined above the properties in the generated module.
class CompositeAlarmAlarmTagsPropagation(TypedDict, closed=True):
"Controls whether the alarm's tags are included in its action notifications and state-change events, and which tag keys are included."
Enabled: Expr[bool]
"Whether the alarm's tags are included in its action notifications and state-change events."
IncludedTagKeys: NotRequired[Expr[list[Expr[str]]]]
'The only tag keys to include.'
ExcludedTagKeys: NotRequired[Expr[list[Expr[str]]]]
'The tag keys to leave out.'
class CompositeAlarmActionConfiguration(TypedDict, closed=True):
'Configuration that applies to the notifications this alarm sends when it performs its actions.'
AlarmTagsPropagation: NotRequired[Expr[CompositeAlarmAlarmTagsPropagation]]
"Whether the alarm's tags are included in its action notifications and state-change events."
class CompositeAlarmProps(TypedDict, closed=True):
'The AWS::CloudWatch::CompositeAlarm type specifies an alarm which aggregates the states of other Alarms (Metric or Composite Alarms) as defined by the AlarmR...'
AlarmName: NotRequired[Expr[str]]
'The name of the Composite Alarm'
AlarmRule: Expr[str]
'Expression which aggregates the state of other Alarms (Metric or Composite Alarms)'
AlarmDescription: NotRequired[Expr[str]]
'The description of the alarm'
ActionsEnabled: NotRequired[Expr[bool]]
'Indicates whether actions should be executed during any changes to the alarm state.'
OKActions: NotRequired[Expr[list[Expr[str]]]]
'The actions to execute when this alarm transitions to the OK state from any other state.'
AlarmActions: NotRequired[Expr[list[Expr[str]]]]
'The list of actions to execute when this alarm transitions into an ALARM state from any other state.'
InsufficientDataActions: NotRequired[Expr[list[Expr[str]]]]
'The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.'
ActionsSuppressor: NotRequired[Expr[str]]
'Actions will be suppressed if the suppressor alarm is in the ALARM state.'
ActionsSuppressorWaitPeriod: NotRequired[Expr[int]]
'Actions will be suppressed if ExtensionPeriod is active.'
ActionsSuppressorExtensionPeriod: NotRequired[Expr[int]]
'Actions will be suppressed if WaitPeriod is active.'
ActionConfiguration: NotRequired[Expr[CompositeAlarmActionConfiguration]]
'Configuration that applies to the notifications this alarm sends when it performs its actions.'
Tags: NotRequired[Expr[Sequence[Expr[Tag]]]]
'A list of key-value pairs to associate with the composite alarm.'
class CompositeAlarm(ResourceAttrs):
'The AWS::CloudWatch::CompositeAlarm type specifies an alarm which aggregates the states of other Alarms (Metric or Composite Alarms) as defined by the AlarmR...'
Type: Literal['AWS::CloudWatch::CompositeAlarm']
Properties: CompositeAlarmProps
def composite_alarm(
*,
depends_on: DependsOn | None = None,
deletion_policy: DeletionPolicy | None = None,
update_replace_policy: UpdateReplacePolicy | None = None,
condition: str | None = None,
metadata: dict[str, Any] | None = None,
**props: Unpack[CompositeAlarmProps],
) -> CompositeAlarm:
return build('AWS::CloudWatch::CompositeAlarm', props, depends_on, deletion_policy, update_replace_policy, condition, metadata)
Attributes¶
Read-only values for get_att(logical_id, attribute). They are not accepted as inputs.
Arn