@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)",
date="2022-05-13T01:13:31.150Z")
public abstract class Schedule
extends software.amazon.jsii.JsiiObject
Example:
Connection connection = Connection.Builder.create(this, "Connection") .authorization(Authorization.apiKey("x-api-key", SecretValue.secretsManager("ApiSecretName"))) .description("Connection with API Key x-api-key") .build(); ApiDestination destination = ApiDestination.Builder.create(this, "Destination") .connection(connection) .endpoint("https://example.com") .description("Calling example.com with API key x-api-key") .build(); Rule rule = Rule.Builder.create(this, "Rule") .schedule(Schedule.rate(Duration.minutes(1))) .targets(List.of(new ApiDestination(destination))) .build();
Modifier | Constructor and Description |
---|---|
protected |
Schedule() |
protected |
Schedule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Schedule(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
static Schedule |
cron(CronOptions options)
Create a schedule from a set of cron fields.
|
static Schedule |
expression(java.lang.String expression)
Construct a schedule from a literal schedule expression.
|
abstract java.lang.String |
getExpressionString()
Retrieve the expression for this schedule.
|
static Schedule |
rate(Duration duration)
Construct a schedule from an interval and a time unit.
|
protected Schedule(software.amazon.jsii.JsiiObjectRef objRef)
protected Schedule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected Schedule()
public static Schedule cron(CronOptions options)
options
- This parameter is required.public static Schedule expression(java.lang.String expression)
expression
- The expression to use. This parameter is required.public static Schedule rate(Duration duration)
duration
- This parameter is required.public abstract java.lang.String getExpressionString()