Skip to content
v2.274.0

CfnScheduleProps Struct ​

Properties for defining a CfnSchedule.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_scheduler as scheduler } from 'aws-cdk-lib';

declare const tags: any;
const cfnScheduleProps: scheduler.CfnScheduleProps = {
  flexibleTimeWindow: {
    mode: 'mode',

    // the properties below are optional
    maximumWindowInMinutes: 123,
  },
  scheduleExpression: 'scheduleExpression',
  target: {
    arn: 'arn',
    roleArn: 'roleArn',

    // the properties below are optional
    deadLetterConfig: {
      arn: 'arn',
    },
    ecsParameters: {
      taskDefinitionArn: 'taskDefinitionArn',

      // the properties below are optional
      capacityProviderStrategy: [{
        capacityProvider: 'capacityProvider',

        // the properties below are optional
        base: 123,
        weight: 123,
      }],
      enableEcsManagedTags: false,
      enableExecuteCommand: false,
      group: 'group',
      launchType: 'launchType',
      networkConfiguration: {
        awsvpcConfiguration: {
          subnets: ['subnets'],

          // the properties below are optional
          assignPublicIp: 'assignPublicIp',
          securityGroups: ['securityGroups'],
        },
      },
      placementConstraints: [{
        expression: 'expression',
        type: 'type',
      }],
      placementStrategy: [{
        field: 'field',
        type: 'type',
      }],
      platformVersion: 'platformVersion',
      propagateTags: 'propagateTags',
      referenceId: 'referenceId',
      tags: tags,
      taskCount: 123,
    },
    eventBridgeParameters: {
      detailType: 'detailType',
      source: 'source',
    },
    input: 'input',
    kinesisParameters: {
      partitionKey: 'partitionKey',
    },
    retryPolicy: {
      maximumEventAgeInSeconds: 123,
      maximumRetryAttempts: 123,
    },
    sageMakerPipelineParameters: {
      pipelineParameterList: [{
        name: 'name',
        value: 'value',
      }],
    },
    sqsParameters: {
      messageGroupId: 'messageGroupId',
    },
  },

  // the properties below are optional
  description: 'description',
  endDate: 'endDate',
  groupName: 'groupName',
  kmsKeyArn: 'kmsKeyArn',
  name: 'name',
  scheduleExpressionTimezone: 'scheduleExpressionTimezone',
  startDate: 'startDate',
  state: 'state',
};

Properties ​

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string#
The description you specify for the schedule.
endDatestringend_datestrendDateStringEndDatestringEndDate*string#
The date, in UTC, before which the schedule can invoke its target.

Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify. EventBridge Scheduler ignores EndDate for one-time schedules.

flexibleTimeWindowIResolvable | CfnSchedule.FlexibleTimeWindowPropertyflexible_time_windowtyping.Union[IResolvable, FlexibleTimeWindowProperty]flexibleTimeWindowIResolvableFlexibleTimeWindowIResolvableFlexibleTimeWindowinterface{}required#
Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
groupNamestringgroup_namestrgroupNameStringGroupNamestringGroupName*string#
The name of the schedule group associated with this schedule.
kmsKeyArnstring | IKeyRefkms_key_arntyping.Union[str, IKeyRef]kmsKeyArnStringKmsKeyArnstringKmsKeyArninterface{}#
The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.
namestringnamestrnameStringNamestringName*string#
The name of the schedule.
scheduleExpressionstringschedule_expressionstrscheduleExpressionStringScheduleExpressionstringScheduleExpression*stringrequired#
The expression that defines when the schedule runs. The following formats are supported.
notes
  • at expression - at(yyyy-mm-ddThh:mm:ss)
  • rate expression - rate(value unit)
  • cron expression - cron(fields)

You can use at expressions to create one-time schedules that invoke a target once, at the time and in the time zone, that you specify. You can use rate and cron expressions to create recurring schedules. Rate-based schedules are useful when you want to invoke a target at regular intervals, such as every 15 minutes or every five days. Cron-based schedules are useful when you want to invoke a target periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day of the month.

A cron expression consists of six fields separated by white spaces: (minutes hours day_of_month month day_of_week year) .

A rate expression consists of a value as a positive integer, and a unit with the following options: minute | minutes | hour | hours | day | days

For more information and examples, see Schedule types on EventBridge Scheduler in the EventBridge Scheduler User Guide .

scheduleExpressionTimezonestringschedule_expression_timezonestrscheduleExpressionTimezoneStringScheduleExpressionTimezonestringScheduleExpressionTimezone*string#
The timezone in which the scheduling expression is evaluated.
startDatestringstart_datestrstartDateStringStartDatestringStartDate*string#
The date, in UTC, after which the schedule can begin invoking its target.

Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify. EventBridge Scheduler ignores StartDate for one-time schedules.

statestringstatestrstateStringStatestringState*string#
Specifies whether the schedule is enabled or disabled.

Allowed Values : ENABLED | DISABLED

targetIResolvable | CfnSchedule.TargetPropertytargettyping.Union[IResolvable, TargetProperty]targetIResolvableTargetIResolvableTargetinterface{}required#
The schedule's target details.