CfnAlarmMuteRuleProps Struct
Properties for defining a CfnAlarmMuteRule.
| Source | |
|---|---|
| Type last changed |
Example
ts
// 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 cfnAlarmMuteRuleProps: cloudwatch.CfnAlarmMuteRuleProps = {
rule: {
schedule: {
duration: 'duration',
expression: 'expression',
// the properties below are optional
timezone: 'timezone',
},
},
// the properties below are optional
description: 'description',
expireDate: 'expireDate',
muteTargets: {
alarmNames: ['alarmNames'],
},
name: 'name',
startDate: 'startDate',
tags: [{
key: 'key',
value: 'value',
}],
};
python
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_alarm_mute_rule_props = cloudwatch.CfnAlarmMuteRuleProps(
rule=cloudwatch.CfnAlarmMuteRule.RuleProperty(
schedule=cloudwatch.CfnAlarmMuteRule.ScheduleProperty(
duration="duration",
expression="expression",
# the properties below are optional
timezone="timezone"
)
),
# the properties below are optional
description="description",
expire_date="expireDate",
mute_targets=cloudwatch.CfnAlarmMuteRule.MuteTargetsProperty(
alarm_names=["alarmNames"]
),
name="name",
start_date="startDate",
tags=[CfnTag(
key="key",
value="value"
)]
)
java
// 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.*;
CfnAlarmMuteRuleProps cfnAlarmMuteRuleProps = CfnAlarmMuteRuleProps.builder()
.rule(RuleProperty.builder()
.schedule(ScheduleProperty.builder()
.duration("duration")
.expression("expression")
// the properties below are optional
.timezone("timezone")
.build())
.build())
// the properties below are optional
.description("description")
.expireDate("expireDate")
.muteTargets(MuteTargetsProperty.builder()
.alarmNames(List.of("alarmNames"))
.build())
.name("name")
.startDate("startDate")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
csharp
// 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 cfnAlarmMuteRuleProps = new CfnAlarmMuteRuleProps {
Rule = new RuleProperty {
Schedule = new ScheduleProperty {
Duration = "duration",
Expression = "expression",
// the properties below are optional
Timezone = "timezone"
}
},
// the properties below are optional
Description = "description",
ExpireDate = "expireDate",
MuteTargets = new MuteTargetsProperty {
AlarmNames = new [] { "alarmNames" }
},
Name = "name",
StartDate = "startDate",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
go
// 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"
cfnAlarmMuteRuleProps := &CfnAlarmMuteRuleProps{
Rule: &RuleProperty{
Schedule: &ScheduleProperty{
Duration: jsii.String("duration"),
Expression: jsii.String("expression"),
// the properties below are optional
Timezone: jsii.String("timezone"),
},
},
// the properties below are optional
Description: jsii.String("description"),
ExpireDate: jsii.String("expireDate"),
MuteTargets: &MuteTargetsProperty{
AlarmNames: []*string{
jsii.String("alarmNames"),
},
},
Name: jsii.String("name"),
StartDate: jsii.String("startDate"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #The description of the AlarmMuteRule.
expireDateoptionalstringexpire_dateoptionalstrexpireDateoptionalStringExpireDateoptionalstringExpireDateoptional*string #The date, with the same timezone offset as "ScheduleTimezone" after which the alarm mute rule will be expired.
muteTargetsoptionalIResolvable | CfnAlarmMuteRule.mute_targetsoptionaltyping.Union[IResolvable, MuteTargetsProperty]muteTargetsoptionalIResolvableMuteTargetsoptionalIResolvableMuteTargetsoptionalinterface{} #Targets to be muted.
The name of the AlarmMuteRule.
ruleIResolvable | CfnAlarmMuteRule.RulePropertyruletyping.Union[IResolvable, RuleProperty]ruleIResolvableRuleIResolvableRuleinterface{} required #The rule for the mute.
startDateoptionalstringstart_dateoptionalstrstartDateoptionalStringStartDateoptionalstringStartDateoptional*string #The date, with the same timezone offset as "ScheduleTimezone", after which the alarm mute rule will become active.