CfnScheduleProps

class aws_cdk.aws_scheduler.CfnScheduleProps(*, flexible_time_window, schedule_expression, target, description=None, end_date=None, group_name=None, kms_key_arn=None, name=None, schedule_expression_timezone=None, start_date=None, state=None)

Bases: object

Properties for defining a CfnSchedule.

Parameters:
  • flexible_time_window (Union[IResolvable, FlexibleTimeWindowProperty, Dict[str, Any]]) – Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.

  • schedule_expression (str) – 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 (Union[IResolvable, TargetProperty, Dict[str, Any]]) – The schedule’s target details.

  • description (Optional[str]) – The description you specify for the schedule.

  • end_date (Optional[str]) – 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.

  • group_name (Optional[str]) – The name of the schedule group associated with this schedule.

  • kms_key_arn (Optional[str]) – The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.

  • name (Optional[str]) – The name of the schedule.

  • schedule_expression_timezone (Optional[str]) – The timezone in which the scheduling expression is evaluated.

  • start_date (Optional[str]) – 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 (Optional[str]) – Specifies whether the schedule is enabled or disabled. Allowed Values : ENABLED | DISABLED

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_scheduler as scheduler

# tags: Any

cfn_schedule_props = scheduler.CfnScheduleProps(
    flexible_time_window=scheduler.CfnSchedule.FlexibleTimeWindowProperty(
        mode="mode",

        # the properties below are optional
        maximum_window_in_minutes=123
    ),
    schedule_expression="scheduleExpression",
    target=scheduler.CfnSchedule.TargetProperty(
        arn="arn",
        role_arn="roleArn",

        # the properties below are optional
        dead_letter_config=scheduler.CfnSchedule.DeadLetterConfigProperty(
            arn="arn"
        ),
        ecs_parameters=scheduler.CfnSchedule.EcsParametersProperty(
            task_definition_arn="taskDefinitionArn",

            # the properties below are optional
            capacity_provider_strategy=[scheduler.CfnSchedule.CapacityProviderStrategyItemProperty(
                capacity_provider="capacityProvider",

                # the properties below are optional
                base=123,
                weight=123
            )],
            enable_ecs_managed_tags=False,
            enable_execute_command=False,
            group="group",
            launch_type="launchType",
            network_configuration=scheduler.CfnSchedule.NetworkConfigurationProperty(
                awsvpc_configuration=scheduler.CfnSchedule.AwsVpcConfigurationProperty(
                    subnets=["subnets"],

                    # the properties below are optional
                    assign_public_ip="assignPublicIp",
                    security_groups=["securityGroups"]
                )
            ),
            placement_constraints=[scheduler.CfnSchedule.PlacementConstraintProperty(
                expression="expression",
                type="type"
            )],
            placement_strategy=[scheduler.CfnSchedule.PlacementStrategyProperty(
                field="field",
                type="type"
            )],
            platform_version="platformVersion",
            propagate_tags="propagateTags",
            reference_id="referenceId",
            tags=tags,
            task_count=123
        ),
        event_bridge_parameters=scheduler.CfnSchedule.EventBridgeParametersProperty(
            detail_type="detailType",
            source="source"
        ),
        input="input",
        kinesis_parameters=scheduler.CfnSchedule.KinesisParametersProperty(
            partition_key="partitionKey"
        ),
        retry_policy=scheduler.CfnSchedule.RetryPolicyProperty(
            maximum_event_age_in_seconds=123,
            maximum_retry_attempts=123
        ),
        sage_maker_pipeline_parameters=scheduler.CfnSchedule.SageMakerPipelineParametersProperty(
            pipeline_parameter_list=[scheduler.CfnSchedule.SageMakerPipelineParameterProperty(
                name="name",
                value="value"
            )]
        ),
        sqs_parameters=scheduler.CfnSchedule.SqsParametersProperty(
            message_group_id="messageGroupId"
        )
    ),

    # the properties below are optional
    description="description",
    end_date="endDate",
    group_name="groupName",
    kms_key_arn="kmsKeyArn",
    name="name",
    schedule_expression_timezone="scheduleExpressionTimezone",
    start_date="startDate",
    state="state"
)

Attributes

description

The description you specify for the schedule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-description

end_date

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-enddate

flexible_time_window

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-flexibletimewindow

group_name

The name of the schedule group associated with this schedule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-groupname

kms_key_arn

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-kmskeyarn

name

The name of the schedule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-name

schedule_expression

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-scheduleexpression

schedule_expression_timezone

The timezone in which the scheduling expression is evaluated.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-scheduleexpressiontimezone

start_date

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-startdate

state

Specifies whether the schedule is enabled or disabled.

Allowed Values : ENABLED | DISABLED

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-state

target

The schedule’s target details.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedule.html#cfn-scheduler-schedule-target