Interface EventBridgeSchedulerCreateScheduleTaskProps

All Superinterfaces:
AssignableStateOptions, software.amazon.jsii.JsiiSerializable, JsonataCommonOptions, JsonPathCommonOptions, StateBaseProps, TaskStateBaseOptions, TaskStateBaseProps
All Known Implementing Classes:
EventBridgeSchedulerCreateScheduleTaskProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-06-03T14:45:00.712Z") @Stability(Stable) public interface EventBridgeSchedulerCreateScheduleTaskProps extends software.amazon.jsii.JsiiSerializable, TaskStateBaseProps
Properties for creating an AWS EventBridge Scheduler schedule.

Example:

 import software.amazon.awscdk.services.scheduler.*;
 import software.amazon.awscdk.services.kms.*;
 Key key;
 CfnScheduleGroup scheduleGroup;
 Queue targetQueue;
 Queue deadLetterQueue;
 Role schedulerRole = Role.Builder.create(this, "SchedulerRole")
         .assumedBy(new ServicePrincipal("scheduler.amazonaws.com"))
         .build();
 // To send the message to the queue
 // This policy changes depending on the type of target.
 schedulerRole.addToPrincipalPolicy(PolicyStatement.Builder.create()
         .actions(List.of("sqs:SendMessage"))
         .resources(List.of(targetQueue.getQueueArn()))
         .build());
 EventBridgeSchedulerCreateScheduleTask createScheduleTask1 = EventBridgeSchedulerCreateScheduleTask.Builder.create(this, "createSchedule")
         .scheduleName("TestSchedule")
         .actionAfterCompletion(ActionAfterCompletion.NONE)
         .clientToken("testToken")
         .description("TestDescription")
         .startDate(new Date())
         .endDate(new Date(new Date().getTime() + 1000 * 60 * 60))
         .flexibleTimeWindow(Duration.minutes(5))
         .groupName(scheduleGroup.getRef())
         .kmsKey(key)
         .schedule(Schedule.rate(Duration.minutes(5)))
         .timezone("UTC")
         .enabled(true)
         .target(EventBridgeSchedulerTarget.Builder.create()
                 .arn(targetQueue.getQueueArn())
                 .role(schedulerRole)
                 .retryPolicy(RetryPolicy.builder()
                         .maximumRetryAttempts(2)
                         .maximumEventAge(Duration.minutes(5))
                         .build())
                 .deadLetterQueue(deadLetterQueue)
                 .build())
         .build();
 
  • Method Details

    • getSchedule

      @Stability(Stable) @NotNull Schedule getSchedule()
      The schedule that defines when the schedule will trigger.

      See Also:
    • getScheduleName

      @Stability(Stable) @NotNull String getScheduleName()
      Schedule name.
    • getTarget

      @Stability(Stable) @NotNull EventBridgeSchedulerTarget getTarget()
      The schedule's target.
    • getActionAfterCompletion

      @Stability(Stable) @Nullable default ActionAfterCompletion getActionAfterCompletion()
      Specifies the action that EventBridge Scheduler applies to the schedule after the schedule completes invoking the target.

      Default: ActionAfterCompletion.NONE

    • getClientToken

      @Stability(Stable) @Nullable default String getClientToken()
      Unique, case-sensitive identifier to ensure the idempotency of the request.

      Default: - Automatically generated

    • getDescription

      @Stability(Stable) @Nullable default String getDescription()
      The description for the schedule.

      Default: - No description

    • getEnabled

      @Stability(Stable) @Nullable default Boolean getEnabled()
      Specifies whether the schedule is enabled or disabled.

      Default: true

    • getEndDate

      @Stability(Stable) @Nullable default Instant getEndDate()
      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.

      Default: - No end date

    • getFlexibleTimeWindow

      @Stability(Stable) @Nullable default Duration getFlexibleTimeWindow()
      The maximum time window during which a schedule can be invoked.

      Minimum value is 1 minute. Maximum value is 1440 minutes (1 day).

      Default: - Flexible time window is not enabled.

    • getGroupName

      @Stability(Stable) @Nullable default String getGroupName()
      The name of the schedule group to associate with this schedule.

      Default: - The default schedule group is used.

    • getKmsKey

      @Stability(Stable) @Nullable default IKey getKmsKey()
      The customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt payload.

      Default: - Use automatically generated KMS key

      See Also:
    • getStartDate

      @Stability(Stable) @Nullable default Instant getStartDate()
      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.

      Default: - No start date

    • getTimezone

      @Stability(Stable) @Nullable default String getTimezone()
      The timezone in which the scheduling expression is evaluated.

      Default: - UTC

    • builder

      @Stability(Stable) static EventBridgeSchedulerCreateScheduleTaskProps.Builder builder()
      Returns:
      a EventBridgeSchedulerCreateScheduleTaskProps.Builder of EventBridgeSchedulerCreateScheduleTaskProps