Class ScheduleExpression

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.scheduler.alpha.ScheduleExpression
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:27.942Z") @Stability(Experimental) public abstract class ScheduleExpression extends software.amazon.jsii.JsiiObject
(experimental) ScheduleExpression for EventBridge Schedule.

You can choose from three schedule types when configuring your schedule: rate-based, cron-based, and one-time schedules. Both rate-based and cron-based schedules are recurring schedules.

Example:

 import software.amazon.awscdk.services.kinesisfirehose.*;
 CfnDeliveryStream deliveryStream;
 Map<String, String> payload = Map.of(
         "Data", "record");
 Schedule.Builder.create(this, "Schedule")
         .schedule(ScheduleExpression.rate(Duration.minutes(60)))
         .target(KinesisDataFirehosePutRecord.Builder.create(deliveryStream)
                 .input(ScheduleTargetInput.fromObject(payload))
                 .build())
         .build();
 

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    ScheduleExpression(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    ScheduleExpression(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    at(Instant date)
    (experimental) Construct a one-time schedule from a date.
    at(Instant date, TimeZone timeZone)
    (experimental) Construct a one-time schedule from a date.
    (experimental) Create a recurring schedule from a set of cron fields and time zone.
    expression(String expression)
    (experimental) Construct a schedule from a literal schedule expression.
    expression(String expression, TimeZone timeZone)
    (experimental) Construct a schedule from a literal schedule expression.
    abstract String
    (experimental) Retrieve the expression for this schedule.
    abstract TimeZone
    (experimental) Retrieve the expression for this schedule.
    rate(Duration duration)
    (experimental) Construct a recurring schedule from an interval and a time unit.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • ScheduleExpression

      protected ScheduleExpression(software.amazon.jsii.JsiiObjectRef objRef)
    • ScheduleExpression

      protected ScheduleExpression(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ScheduleExpression

      @Stability(Experimental) protected ScheduleExpression()
  • Method Details

    • at

      @Stability(Experimental) @NotNull public static ScheduleExpression at(@NotNull Instant date, @Nullable TimeZone timeZone)
      (experimental) Construct a one-time schedule from a date.

      Parameters:
      date - The date and time to use. This parameter is required.
      timeZone - The time zone to use for interpreting the date.
    • at

      @Stability(Experimental) @NotNull public static ScheduleExpression at(@NotNull Instant date)
      (experimental) Construct a one-time schedule from a date.

      Parameters:
      date - The date and time to use. This parameter is required.
    • cron

      @Stability(Experimental) @NotNull public static ScheduleExpression cron(@NotNull CronOptionsWithTimezone options)
      (experimental) Create a recurring schedule from a set of cron fields and time zone.

      Parameters:
      options - This parameter is required.
    • expression

      @Stability(Experimental) @NotNull public static ScheduleExpression expression(@NotNull String expression, @Nullable TimeZone timeZone)
      (experimental) Construct a schedule from a literal schedule expression.

      Parameters:
      expression - The expression to use. This parameter is required.
      timeZone - The time zone to use for interpreting the expression.
    • expression

      @Stability(Experimental) @NotNull public static ScheduleExpression expression(@NotNull String expression)
      (experimental) Construct a schedule from a literal schedule expression.

      Parameters:
      expression - The expression to use. This parameter is required.
    • rate

      @Stability(Experimental) @NotNull public static ScheduleExpression rate(@NotNull Duration duration)
      (experimental) Construct a recurring schedule from an interval and a time unit.

      Rates may be defined with any unit of time, but when converted into minutes, the duration must be a positive whole number of minutes.

      Parameters:
      duration - This parameter is required.
    • getExpressionString

      @Stability(Experimental) @NotNull public abstract String getExpressionString()
      (experimental) Retrieve the expression for this schedule.
    • getTimeZone

      @Stability(Experimental) @Nullable public abstract TimeZone getTimeZone()
      (experimental) Retrieve the expression for this schedule.