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.84.0 (build 5404dcf)", date="2023-06-19T16:30:47.742Z") @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());