ScheduleGroupProps Struct
Properties for a Schedule Group.
| Source | aws-scheduler/lib/schedule-group.ts |
|---|---|
| Type last changed |
Example
ts
declare const target: targets.LambdaInvoke;
const scheduleGroup = new ScheduleGroup(this, "ScheduleGroup", {
scheduleGroupName: "MyScheduleGroup",
});
new Schedule(this, 'Schedule', {
schedule: ScheduleExpression.rate(Duration.minutes(10)),
target,
scheduleGroup,
});
python
# target: targets.LambdaInvoke
schedule_group = ScheduleGroup(self, "ScheduleGroup",
schedule_group_name="MyScheduleGroup"
)
Schedule(self, "Schedule",
schedule=ScheduleExpression.rate(Duration.minutes(10)),
target=target,
schedule_group=schedule_group
)
java
LambdaInvoke target;
ScheduleGroup scheduleGroup = ScheduleGroup.Builder.create(this, "ScheduleGroup")
.scheduleGroupName("MyScheduleGroup")
.build();
Schedule.Builder.create(this, "Schedule")
.schedule(ScheduleExpression.rate(Duration.minutes(10)))
.target(target)
.scheduleGroup(scheduleGroup)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
LambdaInvoke target;
var scheduleGroup = new ScheduleGroup(this, "ScheduleGroup", new ScheduleGroupProps {
ScheduleGroupName = "MyScheduleGroup"
});
new Schedule(this, "Schedule", new ScheduleProps {
Schedule = ScheduleExpression.Rate(Duration.Minutes(10)),
Target = target,
ScheduleGroup = scheduleGroup
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var target LambdaInvoke
scheduleGroup := awscdk.NewScheduleGroup(this, jsii.String("ScheduleGroup"), &ScheduleGroupProps{
ScheduleGroupName: jsii.String("MyScheduleGroup"),
})
awscdk.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{
Schedule: awscdk.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(10))),
Target: Target,
ScheduleGroup: ScheduleGroup,
})
Properties
removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy = RemovalPolicy.RETAIN #The removal policy for the group.
If the group is removed also all schedules are removed.
scheduleGroupNameoptionalstringschedule_group_nameoptionalstrscheduleGroupNameoptionalStringScheduleGroupNameoptionalstringScheduleGroupNameoptional*string #The name of the schedule group.
Default: A unique name will be generated
Up to 64 letters (uppercase and lowercase), numbers, hyphens, underscores and dots are allowed.