Class SfnStateMachine
Use a StepFunctions state machine as a target for Amazon EventBridge rules.
Inheritance
System.Object
SfnStateMachine
Implements
Namespace: Amazon.CDK.AWS.Events.Targets
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SfnStateMachine : DeputyBase, IRuleTarget
Syntax (vb)
Public Class SfnStateMachine
Inherits DeputyBase
Implements IRuleTarget
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.StepFunctions;
var rule = new Rule(this, "Rule", new RuleProps {
Schedule = Schedule.Rate(Duration.Minutes(1))
});
var dlq = new Queue(this, "DeadLetterQueue");
var role = new Role(this, "Role", new RoleProps {
AssumedBy = new ServicePrincipal("events.amazonaws.com")
});
var stateMachine = new StateMachine(this, "SM", new StateMachineProps {
Definition = new Wait(this, "Hello", new WaitProps { Time = WaitTime.Duration(Duration.Seconds(10)) })
});
rule.AddTarget(new SfnStateMachine(stateMachine, new SfnStateMachineProps {
Input = RuleTargetInput.FromObject(new Dictionary<string, string> { { "SomeParam", "SomeValue" } }),
DeadLetterQueue = dlq,
Role = role
}));
Synopsis
Constructors
SfnStateMachine(IStateMachine, ISfnStateMachineProps) | |
SfnStateMachine(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
SfnStateMachine(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
Machine |
Methods
Bind(IRule, String) | Returns a properties that are used in an Rule to trigger this State Machine. |
Constructors
SfnStateMachine(IStateMachine, ISfnStateMachineProps)
public SfnStateMachine(IStateMachine machine, ISfnStateMachineProps props = null)
Parameters
- machine IStateMachine
- props ISfnStateMachineProps
SfnStateMachine(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected SfnStateMachine(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
SfnStateMachine(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected SfnStateMachine(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
Machine
Methods
Bind(IRule, String)
Returns a properties that are used in an Rule to trigger this State Machine.
public virtual IRuleTargetConfig Bind(IRule rule, string id = null)
Parameters
- rule IRule
- id System.String
Returns