Class CfnSchedule.Builder

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

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

    • create

      @Stability(Stable) public static CfnSchedule.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnSchedule.Builder.
    • flexibleTimeWindow

      @Stability(Stable) public CfnSchedule.Builder flexibleTimeWindow(CfnSchedule.FlexibleTimeWindowProperty flexibleTimeWindow)
      Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.

      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 CfnSchedule.Builder flexibleTimeWindow(IResolvable flexibleTimeWindow)
      Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.

      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 CfnSchedule.Builder scheduleExpression(String scheduleExpression)
      The expression that defines when the schedule runs. The following formats are supported.

      • 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 .

      Parameters:
      scheduleExpression - The expression that defines when the schedule runs. The following formats are supported. This parameter is required.
      Returns:
      this
    • target

      @Stability(Stable) public CfnSchedule.Builder target(IResolvable target)
      The schedule's target details.

      Parameters:
      target - The schedule's target details. This parameter is required.
      Returns:
      this
    • target

      @Stability(Stable) public CfnSchedule.Builder target(CfnSchedule.TargetProperty target)
      The schedule's target details.

      Parameters:
      target - The schedule's target details. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public CfnSchedule.Builder description(String description)
      The description you specify for the schedule.

      Parameters:
      description - The description you specify for the schedule. This parameter is required.
      Returns:
      this
    • endDate

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

      Parameters:
      endDate - The date, in UTC, before which the schedule can invoke its target. This parameter is required.
      Returns:
      this
    • groupName

      @Stability(Stable) public CfnSchedule.Builder groupName(String groupName)
      The name of the schedule group associated with this schedule.

      Parameters:
      groupName - The name of the schedule group associated with this schedule. This parameter is required.
      Returns:
      this
    • kmsKeyArn

      @Stability(Stable) public CfnSchedule.Builder kmsKeyArn(String kmsKeyArn)
      The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.

      Parameters:
      kmsKeyArn - The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data. This parameter is required.
      Returns:
      this
    • name

      @Stability(Stable) public CfnSchedule.Builder name(String name)
      The name of the schedule.

      Parameters:
      name - The name of the schedule. This parameter is required.
      Returns:
      this
    • scheduleExpressionTimezone

      @Stability(Stable) public CfnSchedule.Builder scheduleExpressionTimezone(String scheduleExpressionTimezone)
      The timezone in which the scheduling expression is evaluated.

      Parameters:
      scheduleExpressionTimezone - The timezone in which the scheduling expression is evaluated. This parameter is required.
      Returns:
      this
    • startDate

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

      Parameters:
      startDate - The date, in UTC, after which the schedule can begin invoking its target. This parameter is required.
      Returns:
      this
    • state

      @Stability(Stable) public CfnSchedule.Builder state(String state)
      Specifies whether the schedule is enabled or disabled.

      Allowed Values : ENABLED | DISABLED

      Parameters:
      state - Specifies whether the schedule is enabled or disabled. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnSchedule build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnSchedule>
      Returns:
      a newly built instance of CfnSchedule.