class SfnStateMachine
| Language | Type name | 
|---|---|
  .NET | Amazon.CDK.AWS.Events.Targets.SfnStateMachine | 
  Java | software.amazon.awscdk.services.events.targets.SfnStateMachine | 
  Python | aws_cdk.aws_events_targets.SfnStateMachine | 
  TypeScript (source) | @aws-cdk/aws-events-targets » SfnStateMachine | 
Implements
IRule
Use a StepFunctions state machine as a target for Amazon EventBridge rules.
Example
import * as iam from '@aws-cdk/aws-iam';
import * as sfn from '@aws-cdk/aws-stepfunctions';
const rule = new events.Rule(this, 'Rule', {
  schedule: events.Schedule.rate(cdk.Duration.minutes(1)),
});
const dlq = new sqs.Queue(this, 'DeadLetterQueue');
const role = new iam.Role(this, 'Role', {
  assumedBy: new iam.ServicePrincipal('events.amazonaws.com'),
});
const stateMachine = new sfn.StateMachine(this, 'SM', {
  definition: new sfn.Wait(this, 'Hello', { time: sfn.WaitTime.duration(cdk.Duration.seconds(10)) })
});
rule.addTarget(new targets.SfnStateMachine(stateMachine, {
  input: events.RuleTargetInput.fromObject({ SomeParam: 'SomeValue' }),
  deadLetterQueue: dlq,
  role: role
}));
Initializer
new SfnStateMachine(machine: IStateMachine, props?: SfnStateMachineProps)
Parameters
- machine 
IStateMachine  - props 
SfnState Machine Props  
Properties
| Name | Type | Description | 
|---|---|---|
| machine | IState | 
machine
Type:
IState
Methods
| Name | Description | 
|---|---|
| bind(_rule, _id?) | Returns a properties that are used in an Rule to trigger this State Machine. | 
bind(_rule, _id?)
public bind(_rule: IRule, _id?: string): RuleTargetConfig
Parameters
- _rule 
IRule - _id 
string 
Returns
Returns a properties that are used in an Rule to trigger this State Machine.

 .NET
 Java
 Python
 TypeScript (