Class CfnScheduleProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnScheduleProps>
- Enclosing interface:
CfnScheduleProps
CfnScheduleProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.description
(String description) Sets the value ofCfnScheduleProps.getDescription()
Sets the value ofCfnScheduleProps.getEndDate()
flexibleTimeWindow
(IResolvable flexibleTimeWindow) Sets the value ofCfnScheduleProps.getFlexibleTimeWindow()
flexibleTimeWindow
(CfnSchedule.FlexibleTimeWindowProperty flexibleTimeWindow) Sets the value ofCfnScheduleProps.getFlexibleTimeWindow()
Sets the value ofCfnScheduleProps.getGroupName()
Sets the value ofCfnScheduleProps.getKmsKeyArn()
Sets the value ofCfnScheduleProps.getName()
scheduleExpression
(String scheduleExpression) Sets the value ofCfnScheduleProps.getScheduleExpression()
scheduleExpressionTimezone
(String scheduleExpressionTimezone) Sets the value ofCfnScheduleProps.getScheduleExpressionTimezone()
Sets the value ofCfnScheduleProps.getStartDate()
Sets the value ofCfnScheduleProps.getState()
target
(IResolvable target) Sets the value ofCfnScheduleProps.getTarget()
target
(CfnSchedule.TargetProperty target) Sets the value ofCfnScheduleProps.getTarget()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
flexibleTimeWindow
@Stability(Stable) public CfnScheduleProps.Builder flexibleTimeWindow(IResolvable flexibleTimeWindow) Sets the value ofCfnScheduleProps.getFlexibleTimeWindow()
- Parameters:
flexibleTimeWindow
- Allows you to configure a time window during which EventBridge Scheduler invokes the schedule. This parameter is required.- Returns:
this
-
flexibleTimeWindow
@Stability(Stable) public CfnScheduleProps.Builder flexibleTimeWindow(CfnSchedule.FlexibleTimeWindowProperty flexibleTimeWindow) Sets the value ofCfnScheduleProps.getFlexibleTimeWindow()
- Parameters:
flexibleTimeWindow
- Allows you to configure a time window during which EventBridge Scheduler invokes the schedule. This parameter is required.- Returns:
this
-
scheduleExpression
Sets the value ofCfnScheduleProps.getScheduleExpression()
- Parameters:
scheduleExpression
- The expression that defines when the schedule runs. The following formats are supported. This parameter is required.at
expression -at(yyyy-mm-ddThh:mm:ss)
rate
expression -rate(value unit)
cron
expression -cron(fields)
You can use
at
expressions to create one-time schedules that invoke a target once, at the time and in the time zone, that you specify. You can userate
andcron
expressions to create recurring schedules. Rate-based schedules are useful when you want to invoke a target at regular intervals, such as every 15 minutes or every five days. Cron-based schedules are useful when you want to invoke a target periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day of the month.A
cron
expression consists of six fields separated by white spaces:(minutes hours day_of_month month day_of_week year)
.A
rate
expression consists of a value as a positive integer, and a unit with the following options:minute
|minutes
|hour
|hours
|day
|days
For more information and examples, see Schedule types on EventBridge Scheduler in the EventBridge Scheduler User Guide .
- Returns:
this
-
target
Sets the value ofCfnScheduleProps.getTarget()
- Parameters:
target
- The schedule's target details. This parameter is required.- Returns:
this
-
target
Sets the value ofCfnScheduleProps.getTarget()
- Parameters:
target
- The schedule's target details. This parameter is required.- Returns:
this
-
description
Sets the value ofCfnScheduleProps.getDescription()
- Parameters:
description
- The description you specify for the schedule.- Returns:
this
-
endDate
Sets the value ofCfnScheduleProps.getEndDate()
- Parameters:
endDate
- The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence expression, invocations might stop on, or before, theEndDate
you specify. EventBridge Scheduler ignoresEndDate
for one-time schedules.- Returns:
this
-
groupName
Sets the value ofCfnScheduleProps.getGroupName()
- Parameters:
groupName
- The name of the schedule group associated with this schedule.- Returns:
this
-
kmsKeyArn
Sets the value ofCfnScheduleProps.getKmsKeyArn()
- Parameters:
kmsKeyArn
- The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.- Returns:
this
-
name
Sets the value ofCfnScheduleProps.getName()
- Parameters:
name
- The name of the schedule.- Returns:
this
-
scheduleExpressionTimezone
@Stability(Stable) public CfnScheduleProps.Builder scheduleExpressionTimezone(String scheduleExpressionTimezone) Sets the value ofCfnScheduleProps.getScheduleExpressionTimezone()
- Parameters:
scheduleExpressionTimezone
- The timezone in which the scheduling expression is evaluated.- Returns:
this
-
startDate
Sets the value ofCfnScheduleProps.getStartDate()
- Parameters:
startDate
- The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence expression, invocations might occur on, or after, theStartDate
you specify. EventBridge Scheduler ignoresStartDate
for one-time schedules.- Returns:
this
-
state
Sets the value ofCfnScheduleProps.getState()
- Parameters:
state
- Specifies whether the schedule is enabled or disabled. Allowed Values :ENABLED
|DISABLED
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnScheduleProps>
- Returns:
- a new instance of
CfnScheduleProps
- Throws:
NullPointerException
- if any required attribute was not provided
-