class LambdaInvoke
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Scheduler.Targets.Alpha.LambdaInvoke |
Go | github.com/aws/aws-cdk-go/awscdkschedulertargetsalpha/v2#LambdaInvoke |
Java | software.amazon.awscdk.services.scheduler.targets.alpha.LambdaInvoke |
Python | aws_cdk.aws_scheduler_targets_alpha.LambdaInvoke |
TypeScript (source) | @aws-cdk/aws-scheduler-targets-alpha » LambdaInvoke |
Implements
ISchedule
Extends
Schedule
Use an AWS Lambda function as a target for AWS EventBridge Scheduler.
Example
declare const fn: lambda.Function;
const target = new targets.LambdaInvoke(fn, {
input: ScheduleTargetInput.fromObject({
"payload": "useful",
}),
});
const schedule = new Schedule(this, 'Schedule', {
schedule: ScheduleExpression.rate(Duration.minutes(10)),
target,
description: 'This is a test schedule that invokes a lambda function every 10 minutes.',
});
Initializer
new LambdaInvoke(func: IFunction, props?: ScheduleTargetBaseProps)
Parameters
- func
IFunction
- props
Schedule
Target Base Props
Methods
Name | Description |
---|---|
bind(schedule) | Create a return a Schedule Target Configuration for the given schedule. |
protected add |
bind(schedule)
public bind(schedule: ISchedule): ScheduleTargetConfig
Parameters
- schedule
ISchedule
Returns
Create a return a Schedule Target Configuration for the given schedule.
TargetActionToRole(role)
protected addprotected addTargetActionToRole(role: IRole): void
Parameters
- role
IRole