class StepFunctionsStartExecution
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Scheduler.Targets.StepFunctionsStartExecution |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsschedulertargets#StepFunctionsStartExecution |
Java | software.amazon.awscdk.services.scheduler.targets.StepFunctionsStartExecution |
Python | aws_cdk.aws_scheduler_targets.StepFunctionsStartExecution |
TypeScript (source) | aws-cdk-lib » aws_scheduler_targets » StepFunctionsStartExecution |
Implements
ISchedule
Extends
Schedule
Use an AWS Step function as a target for AWS EventBridge Scheduler.
Example
import * as sfn from 'aws-cdk-lib/aws-stepfunctions';
import * as tasks from 'aws-cdk-lib/aws-stepfunctions-tasks';
const payload = {
Name: "MyParameter",
Value: '🌥️',
};
const putParameterStep = new tasks.CallAwsService(this, 'PutParameter', {
service: 'ssm',
action: 'putParameter',
iamResources: ['*'],
parameters: {
"Name.$": '$.Name',
"Value.$": '$.Value',
Type: 'String',
Overwrite: true,
},
});
const stateMachine = new sfn.StateMachine(this, 'StateMachine', {
definitionBody: sfn.DefinitionBody.fromChainable(putParameterStep)
});
new Schedule(this, 'Schedule', {
schedule: ScheduleExpression.rate(Duration.hours(1)),
target: new targets.StepFunctionsStartExecution(stateMachine, {
input: ScheduleTargetInput.fromObject(payload),
}),
});
Initializer
new StepFunctionsStartExecution(stateMachine: IStateMachine, props: ScheduleTargetBaseProps)
Parameters
- stateMachine
IStateMachine - props
ScheduleTarget 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.
protected addTargetActionToRole(role)
protected addTargetActionToRole(role: IRole): void
Parameters
- role
IRole

.NET
Go
Java
Python
TypeScript (