Class SfnStateMachineProps
Customize the Step Functions State Machine target.
Inheritance
Namespace: Amazon.CDK.AWS.Events.Targets
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SfnStateMachineProps : Object, ISfnStateMachineProps, ITargetBaseProps
Syntax (vb)
Public Class SfnStateMachineProps
Inherits Object
Implements ISfnStateMachineProps, ITargetBaseProps
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
SfnStateMachineProps() |
Properties
DeadLetterQueue | The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue. |
Input | The input to the state machine execution. |
MaxEventAge | The maximum age of a request that Lambda sends to a function for processing. |
RetryAttempts | The maximum number of times to retry when the function returns an error. |
Role | The IAM role to be assumed to execute the State Machine. |
Constructors
SfnStateMachineProps()
public SfnStateMachineProps()
Properties
DeadLetterQueue
The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue.
public IQueue DeadLetterQueue { get; set; }
Property Value
Remarks
The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.
Default: - no dead-letter queue
Input
The input to the state machine execution.
public RuleTargetInput Input { get; set; }
Property Value
Remarks
Default: the entire EventBridge event
MaxEventAge
The maximum age of a request that Lambda sends to a function for processing.
public Duration MaxEventAge { get; set; }
Property Value
Remarks
Minimum value of 60. Maximum value of 86400.
Default: Duration.hours(24)
RetryAttempts
The maximum number of times to retry when the function returns an error.
public Nullable<double> RetryAttempts { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Minimum value of 0. Maximum value of 185.
Default: 185
Role
The IAM role to be assumed to execute the State Machine.
public IRole Role { get; set; }
Property Value
Remarks
Default: - a new role will be created