Skip to content
v2.277.0

AlarmMuteRuleOptions Struct ​

Options used to configure a CloudWatch alarm mute rule.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';

declare const scheduleExpression: cloudwatch.ScheduleExpression;
const alarmMuteRuleOptions: cloudwatch.AlarmMuteRuleOptions = {
  duration: cdk.Duration.minutes(30),
  schedule: scheduleExpression,

  // the properties below are optional
  alarmMuteRuleName: 'alarmMuteRuleName',
  description: 'description',
  expire: {
    day: 123,
    hour: 123,
    minute: 123,
    month: 123,
    year: 123,
  },
  start: {
    day: 123,
    hour: 123,
    minute: 123,
    month: 123,
    year: 123,
  },
  tags: {
    tagsKey: 'tags',
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_cloudwatch as cloudwatch

# schedule_expression: cloudwatch.ScheduleExpression

alarm_mute_rule_options = cloudwatch.AlarmMuteRuleOptions(
    duration=cdk.Duration.minutes(30),
    schedule=schedule_expression,

    # the properties below are optional
    alarm_mute_rule_name="alarmMuteRuleName",
    description="description",
    expire=cloudwatch.CalendarDateTime(
        day=123,
        hour=123,
        minute=123,
        month=123,
        year=123
    ),
    start=cloudwatch.CalendarDateTime(
        day=123,
        hour=123,
        minute=123,
        month=123,
        year=123
    ),
    tags={
        "tags_key": "tags"
    }
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.cloudwatch.*;

ScheduleExpression scheduleExpression;

AlarmMuteRuleOptions alarmMuteRuleOptions = AlarmMuteRuleOptions.builder()
        .duration(Duration.minutes(30))
        .schedule(scheduleExpression)

        // the properties below are optional
        .alarmMuteRuleName("alarmMuteRuleName")
        .description("description")
        .expire(CalendarDateTime.builder()
                .day(123)
                .hour(123)
                .minute(123)
                .month(123)
                .year(123)
                .build())
        .start(CalendarDateTime.builder()
                .day(123)
                .hour(123)
                .minute(123)
                .month(123)
                .year(123)
                .build())
        .tags(Map.of(
                "tagsKey", "tags"))
        .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;
using Amazon.CDK.AWS.CloudWatch;

ScheduleExpression scheduleExpression;

var alarmMuteRuleOptions = new AlarmMuteRuleOptions {
    Duration = Duration.Minutes(30),
    Schedule = scheduleExpression,

    // the properties below are optional
    AlarmMuteRuleName = "alarmMuteRuleName",
    Description = "description",
    Expire = new CalendarDateTime {
        Day = 123,
        Hour = 123,
        Minute = 123,
        Month = 123,
        Year = 123
    },
    Start = new CalendarDateTime {
        Day = 123,
        Hour = 123,
        Minute = 123,
        Month = 123,
        Year = 123
    },
    Tags = new Dictionary<string, string> {
        { "tagsKey", "tags" }
    }
};
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 cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var scheduleExpression ScheduleExpression

alarmMuteRuleOptions := &AlarmMuteRuleOptions{
	Duration: cdk.Duration_Minutes(jsii.Number(30)),
	Schedule: scheduleExpression,

	// the properties below are optional
	AlarmMuteRuleName: jsii.String("alarmMuteRuleName"),
	Description: jsii.String("description"),
	Expire: &CalendarDateTime{
		Day: jsii.Number(123),
		Hour: jsii.Number(123),
		Minute: jsii.Number(123),
		Month: jsii.Number(123),
		Year: jsii.Number(123),
	},
	Start: &CalendarDateTime{
		Day: jsii.Number(123),
		Hour: jsii.Number(123),
		Minute: jsii.Number(123),
		Month: jsii.Number(123),
		Year: jsii.Number(123),
	},
	Tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
}

Properties ​

alarmMuteRuleNameoptionalstringalarm_mute_rule_nameoptionalstralarmMuteRuleNameoptionalStringAlarmMuteRuleNameoptionalstringAlarmMuteRuleNameoptional*string#
The name of the alarm mute rule.

Default: generated by CloudFormation

This name must be unique within your AWS account and region.

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
A description of the alarm mute rule that helps you identify its purpose.

Default: no description

durationDurationdurationDurationdurationDurationDurationDurationDurationDurationrequired#
The length of time that alarms remain muted when the schedule activates.

Minimum: 1 minute, Maximum: 15 days

expireoptionalCalendarDateTimeexpireoptionalCalendarDateTimeexpireoptionalCalendarDateTimeExpireoptionalCalendarDateTimeExpireoptionalCalendarDateTime#
The date and time when the mute rule expires and is no longer evaluated.

Default: no configuration

After this time, the rule status becomes EXPIRED and will no longer mute the targeted alarms.

This date and time is interpreted according to the schedule timezone, or UTC if no timezone is specified.

The schedule defines when alarms should be muted.
startoptionalCalendarDateTimestartoptionalCalendarDateTimestartoptionalCalendarDateTimeStartoptionalCalendarDateTimeStartoptionalCalendarDateTime#
The date and time after which the mute rule takes effect.

Default: no configuration

If not specified, the mute rule takes effect immediately upon creation and the mutes are applied as per the schedule expression.

This date and time is interpreted according to the schedule timezone, or UTC if no timezone is specified.

tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string#
A list of tags associated with the alarm mute rule.

Default: No tags are applied

Tags help you organize and categorize your AWS resources.