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.98.0 (build 00b106d)", date="2024-05-24T02:42:38.472Z") @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());