Class Wait
Define a Wait state in the state machine.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Wait : State, IChainable, INextable
Syntax (vb)
Public Class Wait
Inherits State
Implements IChainable, INextable
Remarks
A Wait state can be used to delay execution of the state machine for a while.
ExampleMetadata: infused
Examples
var convertToSeconds = new EvaluateExpression(this, "Convert to seconds", new EvaluateExpressionProps {
Expression = "$.waitMilliseconds / 1000",
ResultPath = "$.waitSeconds"
});
var createMessage = new EvaluateExpression(this, "Create message", new EvaluateExpressionProps {
// Note: this is a string inside a string.
Expression = "`Now waiting ${$.waitSeconds} seconds...`",
Runtime = Runtime.NODEJS_LATEST,
ResultPath = "$.message"
});
var publishMessage = new SnsPublish(this, "Publish message", new SnsPublishProps {
Topic = new Topic(this, "cool-topic"),
Message = TaskInput.FromJsonPathAt("$.message"),
ResultPath = "$.sns"
});
var wait = new Wait(this, "Wait", new WaitProps {
Time = WaitTime.SecondsPath("$.waitSeconds")
});
new StateMachine(this, "StateMachine", new StateMachineProps {
Definition = convertToSeconds.Next(createMessage).Next(publishMessage).Next(wait)
});
Synopsis
Constructors
Wait(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Wait(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Wait(Construct, String, IWaitProps) |
Properties
EndStates | Continuable states of this Chainable. |
Methods
Next(IChainable) | Continue normal execution with the given state. |
ToStateJson() | Return the Amazon States Language object for this state. |
Constructors
Wait(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Wait(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Wait(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Wait(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Wait(Construct, String, IWaitProps)
public Wait(Construct scope, string id, IWaitProps props)
Parameters
- scope Constructs.Construct
- id System.String
Descriptive identifier for this chainable.
- props IWaitProps
Properties
EndStates
Continuable states of this Chainable.
public override INextable[] EndStates { get; }
Property Value
Overrides
Methods
Next(IChainable)
Continue normal execution with the given state.
public virtual Chain Next(IChainable next)
Parameters
- next IChainable
Returns
ToStateJson()
Return the Amazon States Language object for this state.
public override JObject ToStateJson()
Returns
Newtonsoft.Json.Linq.JObject