Show / Hide Table of Contents

Class ScheduleExpression

Schedule expression for CloudWatch alarm mute rule.

Inheritance
object
ScheduleExpression
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class ScheduleExpression : DeputyBase
Syntax (vb)
Public MustInherit Class ScheduleExpression Inherits DeputyBase
Remarks

You can choose from three schedule types when configuring your schedule: cron-based and one-time schedules. Cron-based schedule is recurring schedule.

See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/alarm-mute-rules.html#defining-alarm-mute-rules

ExampleMetadata: infused

Examples
Alarm alarm1;
             Alarm alarm2;


             var alarmMuteRule = new AlarmMuteRule(this, "AlarmMuteRule", new AlarmMuteRuleProps {
                 Alarms = new [] { alarm1 },
                 // Defines the mute period begins at 0:00 everyday in UTC
                 Schedule = ScheduleExpression.Cron(new CronOptions { Minute = "0", Hour = "0" }),
                 // Specifies the mute rule lasts 1 hour.
                 Duration = Duration.Hours(1)
             });

             // The mute target can be added after construction.
             alarmMuteRule.AddAlarm(alarm2);

Synopsis

Constructors

ScheduleExpression()

Schedule expression for CloudWatch alarm mute rule.

Properties

ExpressionString

Retrieve the expression for this schedule.

TimeZone

Retrieve the expression for this schedule.

Methods

At(ICalendarDateTime, TimeZone?)

Construct a one-time schedule from a date.

Cron(ICronOptions)

Create a recurring schedule from a set of cron fields and time zone.

Expression(string, TimeZone?)

Construct a schedule from a literal schedule expression.

Constructors

ScheduleExpression()

Schedule expression for CloudWatch alarm mute rule.

protected ScheduleExpression()
Remarks

You can choose from three schedule types when configuring your schedule: cron-based and one-time schedules. Cron-based schedule is recurring schedule.

See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/alarm-mute-rules.html#defining-alarm-mute-rules

ExampleMetadata: infused

Examples
Alarm alarm1;
             Alarm alarm2;


             var alarmMuteRule = new AlarmMuteRule(this, "AlarmMuteRule", new AlarmMuteRuleProps {
                 Alarms = new [] { alarm1 },
                 // Defines the mute period begins at 0:00 everyday in UTC
                 Schedule = ScheduleExpression.Cron(new CronOptions { Minute = "0", Hour = "0" }),
                 // Specifies the mute rule lasts 1 hour.
                 Duration = Duration.Hours(1)
             });

             // The mute target can be added after construction.
             alarmMuteRule.AddAlarm(alarm2);

Properties

ExpressionString

Retrieve the expression for this schedule.

public abstract string ExpressionString { get; }
Property Value

string

Remarks

You can choose from three schedule types when configuring your schedule: cron-based and one-time schedules. Cron-based schedule is recurring schedule.

See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/alarm-mute-rules.html#defining-alarm-mute-rules

ExampleMetadata: infused

TimeZone

Retrieve the expression for this schedule.

public abstract TimeZone? TimeZone { get; }
Property Value

TimeZone

Remarks

You can choose from three schedule types when configuring your schedule: cron-based and one-time schedules. Cron-based schedule is recurring schedule.

See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/alarm-mute-rules.html#defining-alarm-mute-rules

ExampleMetadata: infused

Methods

At(ICalendarDateTime, TimeZone?)

Construct a one-time schedule from a date.

public static ScheduleExpression At(ICalendarDateTime date, TimeZone? timeZone = null)
Parameters
date ICalendarDateTime

The date and time to use.

timeZone TimeZone

The time zone to use for interpreting the date.

Returns

ScheduleExpression

Remarks

You can choose from three schedule types when configuring your schedule: cron-based and one-time schedules. Cron-based schedule is recurring schedule.

See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/alarm-mute-rules.html#defining-alarm-mute-rules

ExampleMetadata: infused

Cron(ICronOptions)

Create a recurring schedule from a set of cron fields and time zone.

public static ScheduleExpression Cron(ICronOptions options)
Parameters
options ICronOptions
Returns

ScheduleExpression

Remarks

You can choose from three schedule types when configuring your schedule: cron-based and one-time schedules. Cron-based schedule is recurring schedule.

See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/alarm-mute-rules.html#defining-alarm-mute-rules

ExampleMetadata: infused

Expression(string, TimeZone?)

Construct a schedule from a literal schedule expression.

public static ScheduleExpression Expression(string expression, TimeZone? timeZone = null)
Parameters
expression string

The expression to use.

timeZone TimeZone

The time zone to use for interpreting the expression.

Returns

ScheduleExpression

Remarks

You can choose from three schedule types when configuring your schedule: cron-based and one-time schedules. Cron-based schedule is recurring schedule.

See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/alarm-mute-rules.html#defining-alarm-mute-rules

ExampleMetadata: infused

Back to top Generated by DocFX