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:
objectProperties for defining a
CfnSchedule.- Parameters:
flexible_time_window (
Union[FlexibleTimeWindowProperty,Dict[str,Any],IResolvable]) – 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. -atexpression -at(yyyy-mm-ddThh:mm:ss)-rateexpression -rate(value unit)-cronexpression -cron(fields)You can useatexpressions to create one-time schedules that invoke a target once, at the time and in the time zone, that you specify. You can userateandcronexpressions 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. Acronexpression consists of six fields separated by white spaces:(minutes hours day_of_month month day_of_week year). Arateexpression consists of a value as a positive integer, and a unit with the following options:minute|minutes|hour|hours|day|daysFor 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, theEndDateyou specify. EventBridge Scheduler ignoresEndDatefor 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, theStartDateyou specify. EventBridge Scheduler ignoresStartDatefor one-time schedules.state (
Optional[str]) – Specifies whether the schedule is enabled or disabled. Allowed Values :ENABLED|DISABLED
- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.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.
- 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
EndDateyou specify. EventBridge Scheduler ignoresEndDatefor one-time schedules.
- flexible_time_window
Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.
- group_name
The name of the schedule group associated with this schedule.
- 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.
- name
The name of the schedule.
- schedule_expression
The expression that defines when the schedule runs. The following formats are supported.
atexpression -at(yyyy-mm-ddThh:mm:ss)rateexpression -rate(value unit)cronexpression -cron(fields)
You can use
atexpressions to create one-time schedules that invoke a target once, at the time and in the time zone, that you specify. You can userateandcronexpressions 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
cronexpression consists of six fields separated by white spaces:(minutes hours day_of_month month day_of_week year).A
rateexpression consists of a value as a positive integer, and a unit with the following options:minute|minutes|hour|hours|day|daysFor more information and examples, see Schedule types on EventBridge Scheduler in the EventBridge Scheduler User Guide .
- schedule_expression_timezone
The timezone in which the scheduling expression is evaluated.
- 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
StartDateyou specify. EventBridge Scheduler ignoresStartDatefor one-time schedules.
- state
Specifies whether the schedule is enabled or disabled.
Allowed Values :
ENABLED|DISABLED
- target
The schedule’s target details.