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.104.0 (build e79254c)",
date="2024-11-22T02:24:11.885Z")
@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.alpha.*; IDeliveryStream 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
ModifierConstructorDescriptionprotected
protected
ScheduleExpression
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
ScheduleExpression
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic ScheduleExpression
(experimental) Construct a one-time schedule from a date.static ScheduleExpression
(experimental) Construct a one-time schedule from a date.static ScheduleExpression
cron
(CronOptionsWithTimezone options) (experimental) Create a recurring schedule from a set of cron fields and time zone.static ScheduleExpression
expression
(String expression) (experimental) Construct a schedule from a literal schedule expression.static ScheduleExpression
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.static ScheduleExpression
(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
(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
(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
(experimental) Retrieve the expression for this schedule. -
getTimeZone
(experimental) Retrieve the expression for this schedule.
-