class TimeWindow
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Scheduler.Alpha.TimeWindow |
Go | github.com/aws/aws-cdk-go/awscdkscheduleralpha/v2#TimeWindow |
Java | software.amazon.awscdk.services.scheduler.alpha.TimeWindow |
Python | aws_cdk.aws_scheduler_alpha.TimeWindow |
TypeScript (source) | @aws-cdk/aws-scheduler-alpha ยป TimeWindow |
A time window during which EventBridge Scheduler invokes the schedule.
Example
declare const target: targets.LambdaInvoke;
const schedule = new Schedule(this, 'Schedule', {
schedule: ScheduleExpression.rate(Duration.hours(12)),
target,
timeWindow: TimeWindow.flexible(Duration.hours(10)),
});
Properties
Name | Type | Description |
---|---|---|
mode | string | Determines whether the schedule is invoked within a flexible time window. |
max | Duration | The maximum time window during which the schedule can be invoked. |
mode
Type:
string
Determines whether the schedule is invoked within a flexible time window.
maxWindow?
Type:
Duration
(optional, default: no value)
The maximum time window during which the schedule can be invoked.
Must be between 1 to 1440 minutes.
Methods
Name | Description |
---|---|
static flexible(maxWindow) | TimeWindow is enabled. |
static off() | TimeWindow is disabled. |
static flexible(maxWindow)
public static flexible(maxWindow: Duration): TimeWindow
Parameters
- maxWindow
Duration
Returns
TimeWindow is enabled.
static off()
public static off(): TimeWindow
Returns
TimeWindow is disabled.