CfnCompositeAlarmProps Struct
Properties for defining a CfnCompositeAlarm.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const cfnCompositeAlarmProps: cloudwatch.CfnCompositeAlarmProps = {
alarmRule: 'alarmRule',
// the properties below are optional
actionConfiguration: {
alarmTagsPropagation: {
enabled: false,
// the properties below are optional
excludedTagKeys: ['excludedTagKeys'],
includedTagKeys: ['includedTagKeys'],
},
},
actionsEnabled: false,
actionsSuppressor: 'actionsSuppressor',
actionsSuppressorExtensionPeriod: 123,
actionsSuppressorWaitPeriod: 123,
alarmActions: ['alarmActions'],
alarmDescription: 'alarmDescription',
alarmName: 'alarmName',
insufficientDataActions: ['insufficientDataActions'],
okActions: ['okActions'],
tags: [{
key: 'key',
value: 'value',
}],
};
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudwatch as cloudwatch
cfn_composite_alarm_props = cloudwatch.CfnCompositeAlarmProps(
alarm_rule="alarmRule",
# the properties below are optional
action_configuration=cloudwatch.CfnCompositeAlarm.ActionConfigurationProperty(
alarm_tags_propagation=cloudwatch.CfnCompositeAlarm.AlarmTagsPropagationProperty(
enabled=False,
# the properties below are optional
excluded_tag_keys=["excludedTagKeys"],
included_tag_keys=["includedTagKeys"]
)
),
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",
insufficient_data_actions=["insufficientDataActions"],
ok_actions=["okActions"],
tags=[CfnTag(
key="key",
value="value"
)]
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudwatch.*;
CfnCompositeAlarmProps cfnCompositeAlarmProps = CfnCompositeAlarmProps.builder()
.alarmRule("alarmRule")
// the properties below are optional
.actionConfiguration(ActionConfigurationProperty.builder()
.alarmTagsPropagation(AlarmTagsPropagationProperty.builder()
.enabled(false)
// the properties below are optional
.excludedTagKeys(List.of("excludedTagKeys"))
.includedTagKeys(List.of("includedTagKeys"))
.build())
.build())
.actionsEnabled(false)
.actionsSuppressor("actionsSuppressor")
.actionsSuppressorExtensionPeriod(123)
.actionsSuppressorWaitPeriod(123)
.alarmActions(List.of("alarmActions"))
.alarmDescription("alarmDescription")
.alarmName("alarmName")
.insufficientDataActions(List.of("insufficientDataActions"))
.okActions(List.of("okActions"))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
// Install: dotnet add package Amazon.CDK.Lib
// 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 cfnCompositeAlarmProps = new CfnCompositeAlarmProps {
AlarmRule = "alarmRule",
// the properties below are optional
ActionConfiguration = new ActionConfigurationProperty {
AlarmTagsPropagation = new AlarmTagsPropagationProperty {
Enabled = false,
// the properties below are optional
ExcludedTagKeys = new [] { "excludedTagKeys" },
IncludedTagKeys = new [] { "includedTagKeys" }
}
},
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"
} }
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnCompositeAlarmProps := &CfnCompositeAlarmProps{
AlarmRule: jsii.String("alarmRule"),
// the properties below are optional
ActionConfiguration: &ActionConfigurationProperty{
AlarmTagsPropagation: &AlarmTagsPropagationProperty{
Enabled: jsii.Boolean(false),
// the properties below are optional
ExcludedTagKeys: []*string{
jsii.String("excludedTagKeys"),
},
IncludedTagKeys: []*string{
jsii.String("includedTagKeys"),
},
},
},
ActionsEnabled: jsii.Boolean(false),
ActionsSuppressor: jsii.String("actionsSuppressor"),
ActionsSuppressorExtensionPeriod: jsii.Number(123),
ActionsSuppressorWaitPeriod: jsii.Number(123),
AlarmActions: []interface{}{
jsii.String("alarmActions"),
},
AlarmDescription: jsii.String("alarmDescription"),
AlarmName: jsii.String("alarmName"),
InsufficientDataActions: []*string{
jsii.String("insufficientDataActions"),
},
OkActions: []interface{}{
jsii.String("okActions"),
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
actionConfigurationoptionalIResolvable | CfnCompositeAlarm.ActionConfigurationPropertyaction_configurationoptionaltyping.Union[IResolvable, ActionConfigurationProperty]actionConfigurationoptionalIResolvableActionConfigurationoptionalIResolvableActionConfigurationoptionalinterface{}#actionsEnabledoptionalboolean | IResolvableactions_enabledoptionaltyping.Union[bool, IResolvable]actionsEnabledoptionalBooleanActionsEnabledoptionalboolActionsEnabledoptionalinterface{}#The default is TRUE.
actionsSuppressoroptionalstring | IAlarmRef | ICompositeAlarmRefactions_suppressoroptionaltyping.Union[str, IAlarmRef, ICompositeAlarmRef]actionsSuppressoroptionalStringActionsSuppressoroptionalstringActionsSuppressoroptionalinterface{}#ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
actionsSuppressorExtensionPeriodoptionalnumberactions_suppressor_extension_periodoptionalint | floatactionsSuppressorExtensionPeriodoptionalNumberActionsSuppressorExtensionPeriodoptionaldoubleActionsSuppressorExtensionPeriodoptional*float64#After this time, the composite alarm performs its actions.
ExtensionPeriodis required only whenActionsSuppressoris specified.
actionsSuppressorWaitPeriodoptionalnumberactions_suppressor_wait_periodoptionalint | floatactionsSuppressorWaitPeriodoptionalNumberActionsSuppressorWaitPeriodoptionaldoubleActionsSuppressorWaitPeriodoptional*float64#After this time, the composite alarm performs its actions.
WaitPeriodis required only whenActionsSuppressoris specified.
alarmActionsoptionalstring | ITopicRef[]alarm_actionsoptionaltyping.List[typing.Union[str, ITopicRef]]alarmActionsoptionalList<String>AlarmActionsoptionalstring[]AlarmActionsoptional*[]interface{}#notes
Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .
alarmDescriptionoptionalstringalarm_descriptionoptionalstralarmDescriptionoptionalStringAlarmDescriptionoptionalstringAlarmDescriptionoptional*string#alarmNameoptionalstringalarm_nameoptionalstralarmNameoptionalStringAlarmNameoptionalstringAlarmNameoptional*string#This name must be unique within your AWS account.
notes
For each alarm that you reference, you designate a function that specifies whether that alarm needs to be in ALARM state, OK state, or INSUFFICIENT_DATA state. You can use operators (AND, OR and NOT) to combine multiple functions in a single expression. You can use parenthesis to logically group the functions in your expression.
You can use either alarm names or ARNs to reference the other alarms that are to be evaluated.
Functions can include the following:
- ALARM("alarm-name or alarm-ARN") is TRUE if the named alarm is in ALARM state.
- OK("alarm-name or alarm-ARN") is TRUE if the named alarm is in OK state.
- INSUFFICIENT_DATA("alarm-name or alarm-ARN") is TRUE if the named alarm is in INSUFFICIENT_DATA state.
- TRUE always evaluates to TRUE.
- FALSE always evaluates to FALSE.
TRUE and FALSE are useful for testing a complex AlarmRule structure, and for testing your alarm actions.
For more information about AlarmRule syntax, see PutCompositeAlarm in the Amazon CloudWatch API Reference .
insufficientDataActionsoptionalstring[]insufficient_data_actionsoptionaltyping.List[str]insufficientDataActionsoptionalList<String>InsufficientDataActionsoptionalstring[]InsufficientDataActionsoptional*[]*string#notes
Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .
okActionsoptionalstring | ITopicRef[]ok_actionsoptionaltyping.List[typing.Union[str, ITopicRef]]okActionsoptionalList<String>OkActionsoptionalstring[]OkActionsoptional*[]interface{}#notes
Each action is specified as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutCompositeAlarm in the Amazon CloudWatch API Reference .
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#notes
You can associate as many as 50 tags with an alarm. To be able to associate tags with the alarm when you create the alarm, you must have the cloudwatch:TagResource permission.
Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.