Class SfnStateMachine

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.events.targets.SfnStateMachine
All Implemented Interfaces:
IRuleTarget, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-11T15:55:59.282Z") @Stability(Stable) public class SfnStateMachine extends software.amazon.jsii.JsiiObject implements IRuleTarget
Use a StepFunctions state machine as a target for Amazon EventBridge rules.

Example:

 import software.amazon.awscdk.services.iam.*;
 import software.amazon.awscdk.services.stepfunctions.*;
 Rule rule = Rule.Builder.create(this, "Rule")
         .schedule(Schedule.rate(Duration.minutes(1)))
         .build();
 Queue dlq = new Queue(this, "DeadLetterQueue");
 Role role = Role.Builder.create(this, "Role")
         .assumedBy(new ServicePrincipal("events.amazonaws.com"))
         .build();
 StateMachine stateMachine = StateMachine.Builder.create(this, "SM")
         .definition(Wait.Builder.create(this, "Hello").time(WaitTime.duration(Duration.seconds(10))).build())
         .build();
 rule.addTarget(SfnStateMachine.Builder.create(stateMachine)
         .input(RuleTargetInput.fromObject(Map.of("SomeParam", "SomeValue")))
         .deadLetterQueue(dlq)
         .role(role)
         .build());