class StepFunctionsStartExecution
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Scheduler.Targets.Alpha.StepFunctionsStartExecution |
![]() | github.com/aws/aws-cdk-go/awscdkschedulertargetsalpha/v2#StepFunctionsStartExecution |
![]() | software.amazon.awscdk.services.scheduler.targets.alpha.StepFunctionsStartExecution |
![]() | aws_cdk.aws_scheduler_targets_alpha.StepFunctionsStartExecution |
![]() | @aws-cdk/aws-scheduler-targets-alpha » 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
IState
Machine - 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.
protected addTargetActionToRole(role)
protected addTargetActionToRole(role: IRole): void
Parameters
- role
IRole