Show / Hide Table of Contents

Class Wait

Define a Wait state in the state machine.

Inheritance
object
State
Wait
Implements
IChainable
INextable
Inherited Members
State.FilterNextables(State[])
State.FindReachableEndStates(State, IFindStateOptions)
State.FindReachableStates(State, IFindStateOptions)
State.PrefixStates(IConstruct, string)
State.AddBranch(StateGraph)
State.AddChoice(Condition, State, IChoiceTransitionOptions)
State.AddItemProcessor(StateGraph, IProcessorConfig)
State.AddIterator(StateGraph)
State.AddPrefix(string)
State.BindToGraph(StateGraph)
State.MakeDefault(State)
State.MakeNext(State)
State.RenderAssign(QueryLanguage?)
State.RenderBranches()
State.RenderChoices(QueryLanguage?)
State.RenderInputOutput()
State.RenderItemProcessor()
State.RenderIterator()
State.RenderNextEnd()
State.RenderQueryLanguage(QueryLanguage?)
State.RenderResultSelector()
State.RenderRetryCatch(QueryLanguage?)
State.ValidateState()
State.WhenBoundToGraph(StateGraph)
State.Branches
State.Id
State.StartState
State.StateId
State.Arguments
State.Assign
State.Comment
State.InputPath
State.OutputPath
State.Outputs
State.Parameters
State.QueryLanguage
State.ResultPath
State.ResultSelector
State.StateName
State.DefaultChoice
State.Iteration
State.Processor
State.ProcessorConfig
State.ProcessorMode
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(Construct, string, IWaitProps)

Define a Wait state in the state machine.

Properties

EndStates

Continuable states of this Chainable.

Methods

JsonPath(Construct, string, IWaitJsonPathProps)

Define a Wait state using JSONPath in the state machine.

Jsonata(Construct, string, IWaitJsonataProps)

Define a Wait state using JSONata in the state machine.

Next(IChainable)

Continue normal execution with the given state.

ToStateJson(QueryLanguage?)

Return the Amazon States Language object for this state.

Constructors

Wait(Construct, string, IWaitProps)

Define a Wait state in the state machine.

public Wait(Construct scope, string id, IWaitProps props)
Parameters
scope Construct
id string

Descriptive identifier for this chainable.

props IWaitProps
Remarks

A Wait state can be used to delay execution of the state machine for a while.

ExampleMetadata: infused

Properties

EndStates

Continuable states of this Chainable.

public override INextable[] EndStates { get; }
Property Value

INextable[]

Overrides
State.EndStates
Remarks

A Wait state can be used to delay execution of the state machine for a while.

ExampleMetadata: infused

Methods

JsonPath(Construct, string, IWaitJsonPathProps)

Define a Wait state using JSONPath in the state machine.

public static Wait JsonPath(Construct scope, string id, IWaitJsonPathProps props)
Parameters
scope Construct
id string
props IWaitJsonPathProps
Returns

Wait

Remarks

A Wait state can be used to delay execution of the state machine for a while.

Jsonata(Construct, string, IWaitJsonataProps)

Define a Wait state using JSONata in the state machine.

public static Wait Jsonata(Construct scope, string id, IWaitJsonataProps props)
Parameters
scope Construct
id string
props IWaitJsonataProps
Returns

Wait

Remarks

A Wait state can be used to delay execution of the state machine for a while.

Next(IChainable)

Continue normal execution with the given state.

public virtual Chain Next(IChainable next)
Parameters
next IChainable
Returns

Chain

Remarks

A Wait state can be used to delay execution of the state machine for a while.

ExampleMetadata: infused

ToStateJson(QueryLanguage?)

Return the Amazon States Language object for this state.

public override JObject ToStateJson(QueryLanguage? topLevelQueryLanguage = null)
Parameters
topLevelQueryLanguage QueryLanguage?
Returns

JObject

Overrides
State.ToStateJson(QueryLanguage?)
Remarks

A Wait state can be used to delay execution of the state machine for a while.

ExampleMetadata: infused

Implements

IChainable
INextable
Back to top Generated by DocFX