Class Schedule
Schedule for scheduled event rules.
Inheritance
Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.AWS.Events.dll
Syntax (csharp)
public abstract class Schedule : DeputyBase
Syntax (vb)
Public MustInherit Class Schedule
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
var connection = new Connection(this, "Connection", new ConnectionProps {
Authorization = Authorization.ApiKey("x-api-key", SecretValue.SecretsManager("ApiSecretName")),
Description = "Connection with API Key x-api-key"
});
var destination = new ApiDestination(this, "Destination", new ApiDestinationProps {
Connection = connection,
Endpoint = "https://example.com",
Description = "Calling example.com with API key x-api-key"
});
var rule = new Rule(this, "Rule", new RuleProps {
Schedule = Schedule.Rate(Duration.Minutes(1)),
Targets = new [] { new ApiDestination(destination) }
});
Synopsis
Constructors
Schedule() | |
Schedule(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Schedule(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
ExpressionString | Retrieve the expression for this schedule. |
Methods
Cron(ICronOptions) | Create a schedule from a set of cron fields. |
Expression(String) | Construct a schedule from a literal schedule expression. |
Rate(Duration) | Construct a schedule from an interval and a time unit. |
Constructors
Schedule()
protected Schedule()
Schedule(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Schedule(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Schedule(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Schedule(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
ExpressionString
Retrieve the expression for this schedule.
public abstract string ExpressionString { get; }
Property Value
System.String
Methods
Cron(ICronOptions)
Create a schedule from a set of cron fields.
public static Schedule Cron(ICronOptions options)
Parameters
- options ICronOptions
Returns
Expression(String)
Construct a schedule from a literal schedule expression.
public static Schedule Expression(string expression)
Parameters
- expression System.String
The expression to use.
Returns