Class StepFunctionsStartExecution

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.scheduler.targets.alpha.ScheduleTargetBase
software.amazon.awscdk.services.scheduler.targets.alpha.StepFunctionsStartExecution
All Implemented Interfaces:
IScheduleTarget, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:16.142Z") @Stability(Experimental) public class StepFunctionsStartExecution extends ScheduleTargetBase implements IScheduleTarget
(experimental) Use an AWS Step function as a target for AWS EventBridge Scheduler.

Example:

 import software.amazon.awscdk.services.stepfunctions.*;
 import software.amazon.awscdk.services.stepfunctions.tasks.*;
 Map<String, String> payload = Map.of(
         "Name", "MyParameter",
         "Value", "🌥️");
 CallAwsService putParameterStep = CallAwsService.Builder.create(this, "PutParameter")
         .service("ssm")
         .action("putParameter")
         .iamResources(List.of("*"))
         .parameters(Map.of(
                 "Name.$", "$.Name",
                 "Value.$", "$.Value",
                 "Type", "String",
                 "Overwrite", true))
         .build();
 StateMachine stateMachine = StateMachine.Builder.create(this, "StateMachine")
         .definitionBody(DefinitionBody.fromChainable(putParameterStep))
         .build();
 Schedule.Builder.create(this, "Schedule")
         .schedule(ScheduleExpression.rate(Duration.hours(1)))
         .target(StepFunctionsStartExecution.Builder.create(stateMachine)
                 .input(ScheduleTargetInput.fromObject(payload))
                 .build())
         .build();
 
  • Constructor Details

    • StepFunctionsStartExecution

      protected StepFunctionsStartExecution(software.amazon.jsii.JsiiObjectRef objRef)
    • StepFunctionsStartExecution

      protected StepFunctionsStartExecution(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • StepFunctionsStartExecution

      @Stability(Experimental) public StepFunctionsStartExecution(@NotNull IStateMachine stateMachine, @NotNull ScheduleTargetBaseProps props)
      Parameters:
      stateMachine - This parameter is required.
      props - This parameter is required.
  • Method Details

    • addTargetActionToRole

      @Stability(Experimental) protected void addTargetActionToRole(@NotNull ISchedule schedule, @NotNull IRole role)
      Specified by:
      addTargetActionToRole in class ScheduleTargetBase
      Parameters:
      schedule - This parameter is required.
      role - This parameter is required.