Documentation ¶
Overview ¶
The CDK Construct Library for Amazon Scheduler
Index ¶
- func NewScheduleExpression_Override(s ScheduleExpression)
- type CronOptionsWithTimezone
- type ScheduleExpression
- func ScheduleExpression_At(date *time.Time, timeZone awscdk.TimeZone) ScheduleExpression
- func ScheduleExpression_Cron(options *CronOptionsWithTimezone) ScheduleExpression
- func ScheduleExpression_Expression(expression *string, timeZone awscdk.TimeZone) ScheduleExpression
- func ScheduleExpression_Rate(duration awscdk.Duration) ScheduleExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewScheduleExpression_Override ¶
func NewScheduleExpression_Override(s ScheduleExpression)
Experimental.
Types ¶
type CronOptionsWithTimezone ¶
type CronOptionsWithTimezone struct { // The day of the month to run this rule at. // Experimental. Day *string `field:"optional" json:"day" yaml:"day"` // The hour to run this rule at. // Experimental. Hour *string `field:"optional" json:"hour" yaml:"hour"` // The minute to run this rule at. // Experimental. Minute *string `field:"optional" json:"minute" yaml:"minute"` // The month to run this rule at. // Experimental. Month *string `field:"optional" json:"month" yaml:"month"` // The day of the week to run this rule at. // Experimental. WeekDay *string `field:"optional" json:"weekDay" yaml:"weekDay"` // The year to run this rule at. // Experimental. Year *string `field:"optional" json:"year" yaml:"year"` // The timezone to run the schedule in. // Experimental. TimeZone awscdk.TimeZone `field:"optional" json:"timeZone" yaml:"timeZone"` }
Options to configure a cron expression.
All fields are strings so you can use complex expressions. Absence of a field implies '*' or '?', whichever one is appropriate.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import scheduler_alpha "github.com/aws/aws-cdk-go/awscdkscheduleralpha" import cdk "github.com/aws/aws-cdk-go/awscdk" var timeZone timeZone cronOptionsWithTimezone := &CronOptionsWithTimezone{ Day: jsii.String("day"), Hour: jsii.String("hour"), Minute: jsii.String("minute"), Month: jsii.String("month"), TimeZone: timeZone, WeekDay: jsii.String("weekDay"), Year: jsii.String("year"), }
See: https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions
Experimental.
type ScheduleExpression ¶
type ScheduleExpression interface { // Retrieve the expression for this schedule. // Experimental. ExpressionString() *string // Retrieve the expression for this schedule. // Experimental. TimeZone() awscdk.TimeZone }
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:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import scheduler_alpha "github.com/aws/aws-cdk-go/awscdkscheduleralpha" import cdk "github.com/aws/aws-cdk-go/awscdk" var timeZone timeZone scheduleExpression := scheduler_alpha.ScheduleExpression_At(NewDate(), timeZone)
See: https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html
Experimental.
func ScheduleExpression_At ¶
func ScheduleExpression_At(date *time.Time, timeZone awscdk.TimeZone) ScheduleExpression
Construct a one-time schedule from a date. Experimental.
func ScheduleExpression_Cron ¶
func ScheduleExpression_Cron(options *CronOptionsWithTimezone) ScheduleExpression
Create a recurring schedule from a set of cron fields and time zone. Experimental.
func ScheduleExpression_Expression ¶
func ScheduleExpression_Expression(expression *string, timeZone awscdk.TimeZone) ScheduleExpression
Construct a schedule from a literal schedule expression. Experimental.
func ScheduleExpression_Rate ¶
func ScheduleExpression_Rate(duration awscdk.Duration) ScheduleExpression
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. Experimental.