CfnScheduleProps Struct
Properties for defining a CfnSchedule.
| Source | |
|---|---|
| Type last changed |
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',
};
# 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"
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.scheduler.*;
Object tags;
CfnScheduleProps cfnScheduleProps = CfnScheduleProps.builder()
.flexibleTimeWindow(FlexibleTimeWindowProperty.builder()
.mode("mode")
// the properties below are optional
.maximumWindowInMinutes(123)
.build())
.scheduleExpression("scheduleExpression")
.target(TargetProperty.builder()
.arn("arn")
.roleArn("roleArn")
// the properties below are optional
.deadLetterConfig(DeadLetterConfigProperty.builder()
.arn("arn")
.build())
.ecsParameters(EcsParametersProperty.builder()
.taskDefinitionArn("taskDefinitionArn")
// the properties below are optional
.capacityProviderStrategy(List.of(CapacityProviderStrategyItemProperty.builder()
.capacityProvider("capacityProvider")
// the properties below are optional
.base(123)
.weight(123)
.build()))
.enableEcsManagedTags(false)
.enableExecuteCommand(false)
.group("group")
.launchType("launchType")
.networkConfiguration(NetworkConfigurationProperty.builder()
.awsvpcConfiguration(AwsVpcConfigurationProperty.builder()
.subnets(List.of("subnets"))
// the properties below are optional
.assignPublicIp("assignPublicIp")
.securityGroups(List.of("securityGroups"))
.build())
.build())
.placementConstraints(List.of(PlacementConstraintProperty.builder()
.expression("expression")
.type("type")
.build()))
.placementStrategy(List.of(PlacementStrategyProperty.builder()
.field("field")
.type("type")
.build()))
.platformVersion("platformVersion")
.propagateTags("propagateTags")
.referenceId("referenceId")
.tags(tags)
.taskCount(123)
.build())
.eventBridgeParameters(EventBridgeParametersProperty.builder()
.detailType("detailType")
.source("source")
.build())
.input("input")
.kinesisParameters(KinesisParametersProperty.builder()
.partitionKey("partitionKey")
.build())
.retryPolicy(RetryPolicyProperty.builder()
.maximumEventAgeInSeconds(123)
.maximumRetryAttempts(123)
.build())
.sageMakerPipelineParameters(SageMakerPipelineParametersProperty.builder()
.pipelineParameterList(List.of(SageMakerPipelineParameterProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.sqsParameters(SqsParametersProperty.builder()
.messageGroupId("messageGroupId")
.build())
.build())
// the properties below are optional
.description("description")
.endDate("endDate")
.groupName("groupName")
.kmsKeyArn("kmsKeyArn")
.name("name")
.scheduleExpressionTimezone("scheduleExpressionTimezone")
.startDate("startDate")
.state("state")
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Scheduler;
var tags;
var cfnScheduleProps = new CfnScheduleProps {
FlexibleTimeWindow = new FlexibleTimeWindowProperty {
Mode = "mode",
// the properties below are optional
MaximumWindowInMinutes = 123
},
ScheduleExpression = "scheduleExpression",
Target = new TargetProperty {
Arn = "arn",
RoleArn = "roleArn",
// the properties below are optional
DeadLetterConfig = new DeadLetterConfigProperty {
Arn = "arn"
},
EcsParameters = new EcsParametersProperty {
TaskDefinitionArn = "taskDefinitionArn",
// the properties below are optional
CapacityProviderStrategy = new [] { new CapacityProviderStrategyItemProperty {
CapacityProvider = "capacityProvider",
// the properties below are optional
Base = 123,
Weight = 123
} },
EnableEcsManagedTags = false,
EnableExecuteCommand = false,
Group = "group",
LaunchType = "launchType",
NetworkConfiguration = new NetworkConfigurationProperty {
AwsvpcConfiguration = new AwsVpcConfigurationProperty {
Subnets = new [] { "subnets" },
// the properties below are optional
AssignPublicIp = "assignPublicIp",
SecurityGroups = new [] { "securityGroups" }
}
},
PlacementConstraints = new [] { new PlacementConstraintProperty {
Expression = "expression",
Type = "type"
} },
PlacementStrategy = new [] { new PlacementStrategyProperty {
Field = "field",
Type = "type"
} },
PlatformVersion = "platformVersion",
PropagateTags = "propagateTags",
ReferenceId = "referenceId",
Tags = tags,
TaskCount = 123
},
EventBridgeParameters = new EventBridgeParametersProperty {
DetailType = "detailType",
Source = "source"
},
Input = "input",
KinesisParameters = new KinesisParametersProperty {
PartitionKey = "partitionKey"
},
RetryPolicy = new RetryPolicyProperty {
MaximumEventAgeInSeconds = 123,
MaximumRetryAttempts = 123
},
SageMakerPipelineParameters = new SageMakerPipelineParametersProperty {
PipelineParameterList = new [] { new SageMakerPipelineParameterProperty {
Name = "name",
Value = "value"
} }
},
SqsParameters = new SqsParametersProperty {
MessageGroupId = "messageGroupId"
}
},
// the properties below are optional
Description = "description",
EndDate = "endDate",
GroupName = "groupName",
KmsKeyArn = "kmsKeyArn",
Name = "name",
ScheduleExpressionTimezone = "scheduleExpressionTimezone",
StartDate = "startDate",
State = "state"
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var tags interface{}
cfnScheduleProps := &CfnScheduleProps{
FlexibleTimeWindow: &FlexibleTimeWindowProperty{
Mode: jsii.String("mode"),
// the properties below are optional
MaximumWindowInMinutes: jsii.Number(123),
},
ScheduleExpression: jsii.String("scheduleExpression"),
Target: &TargetProperty{
Arn: jsii.String("arn"),
RoleArn: jsii.String("roleArn"),
// the properties below are optional
DeadLetterConfig: &DeadLetterConfigProperty{
Arn: jsii.String("arn"),
},
EcsParameters: &EcsParametersProperty{
TaskDefinitionArn: jsii.String("taskDefinitionArn"),
// the properties below are optional
CapacityProviderStrategy: []interface{}{
&CapacityProviderStrategyItemProperty{
CapacityProvider: jsii.String("capacityProvider"),
// the properties below are optional
Base: jsii.Number(123),
Weight: jsii.Number(123),
},
},
EnableEcsManagedTags: jsii.Boolean(false),
EnableExecuteCommand: jsii.Boolean(false),
Group: jsii.String("group"),
LaunchType: jsii.String("launchType"),
NetworkConfiguration: &NetworkConfigurationProperty{
AwsvpcConfiguration: &AwsVpcConfigurationProperty{
Subnets: []*string{
jsii.String("subnets"),
},
// the properties below are optional
AssignPublicIp: jsii.String("assignPublicIp"),
SecurityGroups: []*string{
jsii.String("securityGroups"),
},
},
},
PlacementConstraints: []interface{}{
&PlacementConstraintProperty{
Expression: jsii.String("expression"),
Type: jsii.String("type"),
},
},
PlacementStrategy: []interface{}{
&PlacementStrategyProperty{
Field: jsii.String("field"),
Type: jsii.String("type"),
},
},
PlatformVersion: jsii.String("platformVersion"),
PropagateTags: jsii.String("propagateTags"),
ReferenceId: jsii.String("referenceId"),
Tags: tags,
TaskCount: jsii.Number(123),
},
EventBridgeParameters: &EventBridgeParametersProperty{
DetailType: jsii.String("detailType"),
Source: jsii.String("source"),
},
Input: jsii.String("input"),
KinesisParameters: &KinesisParametersProperty{
PartitionKey: jsii.String("partitionKey"),
},
RetryPolicy: &RetryPolicyProperty{
MaximumEventAgeInSeconds: jsii.Number(123),
MaximumRetryAttempts: jsii.Number(123),
},
SageMakerPipelineParameters: &SageMakerPipelineParametersProperty{
PipelineParameterList: []interface{}{
&SageMakerPipelineParameterProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
},
SqsParameters: &SqsParametersProperty{
MessageGroupId: jsii.String("messageGroupId"),
},
},
// the properties below are optional
Description: jsii.String("description"),
EndDate: jsii.String("endDate"),
GroupName: jsii.String("groupName"),
KmsKeyArn: jsii.String("kmsKeyArn"),
Name: jsii.String("name"),
ScheduleExpressionTimezone: jsii.String("scheduleExpressionTimezone"),
StartDate: jsii.String("startDate"),
State: jsii.String("state"),
}
Properties
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #endDateoptionalstringend_dateoptionalstrendDateoptionalStringEndDateoptionalstringEndDateoptional*string #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.flexible_time_windowtyping.Union[IResolvable, FlexibleTimeWindowProperty]flexibleTimeWindowIResolvableFlexibleTimeWindowIResolvableFlexibleTimeWindowinterface{} required #groupNameoptionalstringgroup_nameoptionalstrgroupNameoptionalStringGroupNameoptionalstringGroupNameoptional*string #kmsKeyArnoptionalstring | IKeyRefkms_key_arnoptionaltyping.Union[str, IKeyRef]kmsKeyArnoptionalStringKmsKeyArnoptionalstringKmsKeyArnoptionalinterface{} #scheduleExpressionstringschedule_expressionstrscheduleExpressionStringScheduleExpressionstringScheduleExpression*string required #notes
atexpression -at(yyyy-mm-ddThh:mm:ss)rateexpression -rate(value unit)cronexpression -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 .
scheduleExpressionTimezoneoptionalstringschedule_expression_timezoneoptionalstrscheduleExpressionTimezoneoptionalStringScheduleExpressionTimezoneoptionalstringScheduleExpressionTimezoneoptional*string #startDateoptionalstringstart_dateoptionalstrstartDateoptionalStringStartDateoptionalstringStartDateoptional*string #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.
Allowed Values : ENABLED | DISABLED
targetIResolvable | CfnSchedule.TargetPropertytargettyping.Union[IResolvable, TargetProperty]targetIResolvableTargetIResolvableTargetinterface{} required #