Class Schedule
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.events.Schedule
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:02.031Z")
@Stability(Stable)
public abstract class Schedule
extends software.amazon.jsii.JsiiObject
Schedule for scheduled event rules.
Note that rates cannot be defined in fractions of minutes.
Example:
import software.amazon.awscdk.services.redshiftserverless.*; CfnWorkgroup workgroup; Rule rule = Rule.Builder.create(this, "Rule") .schedule(Schedule.rate(Duration.hours(1))) .build(); Queue dlq = new Queue(this, "DeadLetterQueue"); rule.addTarget(RedshiftQuery.Builder.create(workgroup.getAttrWorkgroupWorkgroupArn()) .database("dev") .deadLetterQueue(dlq) .sql(List.of("SELECT * FROM foo", "SELECT * FROM baz")) .build());
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Schedule
cron
(CronOptions options) Create a schedule from a set of cron fields.static Schedule
expression
(String expression) Construct a schedule from a literal schedule expression.abstract String
Retrieve the expression for this schedule.static Schedule
Construct a 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
-
Schedule
protected Schedule(software.amazon.jsii.JsiiObjectRef objRef) -
Schedule
protected Schedule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Schedule
@Stability(Stable) protected Schedule()
-
-
Method Details
-
cron
Create a schedule from a set of cron fields.- Parameters:
options
- This parameter is required.
-
expression
Construct a schedule from a literal schedule expression.- Parameters:
expression
- The expression to use. This parameter is required.
-
rate
Construct a 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
Retrieve the expression for this schedule.
-