Class RetryProps
Retry details.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.AWS.StepFunctions.dll
Syntax (csharp)
public class RetryProps : Object, IRetryProps
Syntax (vb)
Public Class RetryProps
Inherits Object
Implements IRetryProps
Remarks
ExampleMetadata: infused
Examples
var parallel = new Parallel(this, "Do the work in parallel");
// Add branches to be executed in parallel
var shipItem = new Pass(this, "ShipItem");
var sendInvoice = new Pass(this, "SendInvoice");
var restock = new Pass(this, "Restock");
parallel.Branch(shipItem);
parallel.Branch(sendInvoice);
parallel.Branch(restock);
// Retry the whole workflow if something goes wrong
parallel.AddRetry(new RetryProps { MaxAttempts = 1 });
// How to recover from errors
var sendFailureNotification = new Pass(this, "SendFailureNotification");
parallel.AddCatch(sendFailureNotification);
// What to do in case everything succeeded
var closeOrder = new Pass(this, "CloseOrder");
parallel.Next(closeOrder);
Synopsis
Constructors
RetryProps() |
Properties
BackoffRate | Multiplication for how much longer the wait interval gets on every retry. |
Errors | Errors to retry. |
Interval | How many seconds to wait initially before retrying. |
MaxAttempts | How many times to retry this particular error. |
Constructors
RetryProps()
public RetryProps()
Properties
BackoffRate
Multiplication for how much longer the wait interval gets on every retry.
public Nullable<double> BackoffRate { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: 2
Errors
Errors to retry.
public string[] Errors { get; set; }
Property Value
System.String[]
Remarks
A list of error strings to retry, which can be either predefined errors (for example Errors.NoChoiceMatched) or a self-defined error.
Default: All errors
Interval
How many seconds to wait initially before retrying.
public Duration Interval { get; set; }
Property Value
Remarks
Default: Duration.seconds(1)
MaxAttempts
How many times to retry this particular error.
public Nullable<double> MaxAttempts { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
May be 0 to disable retry for specific errors (in case you have a catch-all retry policy).
Default: 3