Class Schedule.Builder

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

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

    • create

      @Stability(Experimental) public static Schedule.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Schedule.Builder.
    • schedule

      @Stability(Experimental) public Schedule.Builder schedule(ScheduleExpression schedule)
      (experimental) The expression that defines when the schedule runs.

      Can be either a at, rate or cron expression.

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

      @Stability(Experimental) public Schedule.Builder target(IScheduleTarget target)
      (experimental) The schedule's target details.

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

      @Stability(Experimental) public Schedule.Builder description(String description)
      (experimental) The description you specify for the schedule.

      Default: - no value

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

      @Stability(Experimental) public Schedule.Builder enabled(Boolean enabled)
      (experimental) Indicates whether the schedule is enabled.

      Default: true

      Parameters:
      enabled - Indicates whether the schedule is enabled. This parameter is required.
      Returns:
      this
    • end

      @Stability(Experimental) public Schedule.Builder end(Instant end)
      (experimental) The date, in UTC, before which the schedule can invoke its target.

      EventBridge Scheduler ignores end for one-time schedules.

      Default: - no value

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

      @Stability(Experimental) public Schedule.Builder group(IGroup group)
      (experimental) The schedule's group.

      Default: - By default a schedule will be associated with the `default` group.

      Parameters:
      group - The schedule's group. This parameter is required.
      Returns:
      this
    • key

      @Stability(Experimental) public Schedule.Builder key(IKey key)
      (experimental) The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.

      Default: - All events in Scheduler are encrypted with a key that AWS owns and manages.

      Parameters:
      key - The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data. This parameter is required.
      Returns:
      this
    • scheduleName

      @Stability(Experimental) public Schedule.Builder scheduleName(String scheduleName)
      (experimental) The name of the schedule.

      Up to 64 letters (uppercase and lowercase), numbers, hyphens, underscores and dots are allowed.

      Default: - A unique name will be generated

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

      @Stability(Experimental) public Schedule.Builder start(Instant start)
      (experimental) The date, in UTC, after which the schedule can begin invoking its target.

      EventBridge Scheduler ignores start for one-time schedules.

      Default: - no value

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

      @Stability(Experimental) public Schedule.Builder timeWindow(TimeWindow timeWindow)
      (experimental) A time window during which EventBridge Scheduler invokes the schedule.

      Default: TimeWindow.off()

      Parameters:
      timeWindow - A time window during which EventBridge Scheduler invokes the schedule. This parameter is required.
      Returns:
      this
      See Also:
    • build

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