aws-cdk-lib.aws_scheduler.CfnScheduleProps

interface CfnScheduleProps

LanguageType name
.NETAmazon.CDK.AWS.Scheduler.CfnScheduleProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsscheduler#CfnScheduleProps
Javasoftware.amazon.awscdk.services.scheduler.CfnScheduleProps
Pythonaws_cdk.aws_scheduler.CfnScheduleProps
TypeScript aws-cdk-lib » aws_scheduler » CfnScheduleProps

Properties for defining a CfnSchedule.

Example

// 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

NameTypeDescription
flexibleTimeWindowIResolvable | FlexibleTimeWindowPropertyAllows you to configure a time window during which EventBridge Scheduler invokes the schedule.
scheduleExpressionstringThe expression that defines when the schedule runs. The following formats are supported.
targetIResolvable | TargetPropertyThe schedule's target details.
description?stringThe description you specify for the schedule.
endDate?stringThe date, in UTC, before which the schedule can invoke its target.
groupName?stringThe name of the schedule group associated with this schedule.
kmsKeyArn?stringThe Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.
name?stringThe name of the schedule.
scheduleExpressionTimezone?stringThe timezone in which the scheduling expression is evaluated.
startDate?stringThe date, in UTC, after which the schedule can begin invoking its target.
state?stringSpecifies whether the schedule is enabled or disabled.

flexibleTimeWindow

Type: IResolvable | FlexibleTimeWindowProperty

Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.


scheduleExpression

Type: string

The expression that defines when the schedule runs. The following formats are supported.

  • 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 .


target

Type: IResolvable | TargetProperty

The schedule's target details.


description?

Type: string (optional)

The description you specify for the schedule.


endDate?

Type: string (optional)

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.


groupName?

Type: string (optional)

The name of the schedule group associated with this schedule.


kmsKeyArn?

Type: string (optional)

The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.


name?

Type: string (optional)

The name of the schedule.


scheduleExpressionTimezone?

Type: string (optional)

The timezone in which the scheduling expression is evaluated.


startDate?

Type: string (optional)

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.


state?

Type: string (optional)

Specifies whether the schedule is enabled or disabled.

Allowed Values : ENABLED | DISABLED