Class CfnScheduleProps.Builder

java.lang.Object
software.amazon.awscdk.services.scheduler.CfnScheduleProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnScheduleProps>
Enclosing interface:
CfnScheduleProps

@Stability(Stable) public static final class CfnScheduleProps.Builder extends Object implements software.amazon.jsii.Builder<CfnScheduleProps>
A builder for CfnScheduleProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • flexibleTimeWindow

      @Stability(Stable) public CfnScheduleProps.Builder flexibleTimeWindow(IResolvable flexibleTimeWindow)
      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)
      Parameters:
      flexibleTimeWindow - Allows you to configure a time window during which EventBridge Scheduler invokes the schedule. This parameter is required.
      Returns:
      this
    • scheduleExpression

      @Stability(Stable) public CfnScheduleProps.Builder scheduleExpression(String scheduleExpression)
      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 use rate and cron 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

      @Stability(Stable) public CfnScheduleProps.Builder target(IResolvable target)
      Parameters:
      target - The schedule's target details. This parameter is required.
      Returns:
      this
    • target

      @Stability(Stable) public CfnScheduleProps.Builder target(CfnSchedule.TargetProperty target)
      Parameters:
      target - The schedule's target details. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public CfnScheduleProps.Builder description(String description)
      Parameters:
      description - The description you specify for the schedule.
      Returns:
      this
    • endDate

      @Stability(Stable) public CfnScheduleProps.Builder endDate(String endDate)
      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, the EndDate you specify. EventBridge Scheduler ignores EndDate for one-time schedules.
      Returns:
      this
    • groupName

      @Stability(Stable) public CfnScheduleProps.Builder groupName(String groupName)
      Parameters:
      groupName - The name of the schedule group associated with this schedule.
      Returns:
      this
    • kmsKeyArn

      @Stability(Stable) public CfnScheduleProps.Builder kmsKeyArn(String kmsKeyArn)
      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

      @Stability(Stable) public CfnScheduleProps.Builder name(String name)
      Sets the value of CfnScheduleProps.getName()
      Parameters:
      name - The name of the schedule.
      Returns:
      this
    • scheduleExpressionTimezone

      @Stability(Stable) public CfnScheduleProps.Builder scheduleExpressionTimezone(String scheduleExpressionTimezone)
      Parameters:
      scheduleExpressionTimezone - The timezone in which the scheduling expression is evaluated.
      Returns:
      this
    • startDate

      @Stability(Stable) public CfnScheduleProps.Builder startDate(String startDate)
      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, the StartDate you specify. EventBridge Scheduler ignores StartDate for one-time schedules.
      Returns:
      this
    • state

      @Stability(Stable) public CfnScheduleProps.Builder state(String state)
      Sets the value of CfnScheduleProps.getState()
      Parameters:
      state - Specifies whether the schedule is enabled or disabled. Allowed Values : ENABLED | DISABLED
      Returns:
      this
    • build

      @Stability(Stable) public CfnScheduleProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnScheduleProps>
      Returns:
      a new instance of CfnScheduleProps
      Throws:
      NullPointerException - if any required attribute was not provided