Show / Hide Table of Contents

Class SfnStateMachineProps

Customize the Step Functions State Machine target.

Inheritance
object
SfnStateMachineProps
Implements
ISfnStateMachineProps
ITargetBaseProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.Events.Targets
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SfnStateMachineProps : ISfnStateMachineProps, ITargetBaseProps
Syntax (vb)
Public Class SfnStateMachineProps 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()

Customize the Step Functions State Machine target.

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()

Customize the Step Functions State Machine target.

public SfnStateMachineProps()
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
            }));

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

IQueue

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

RuleTargetInput

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

Duration

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 double? RetryAttempts { get; set; }
Property Value

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

IRole

Remarks

Default: - a new role will be created

Implements

ISfnStateMachineProps
ITargetBaseProps
Back to top Generated by DocFX