All Products
Search
Document Center

CloudFlow:Wait

Last Updated:Mar 11, 2026

A Wait state pauses a flow execution for a specified number of seconds, then resumes from the next state. Use it to introduce delays between states -- for example, waiting before retrying an operation or spacing out API calls.

Important

The maximum pause duration depends on the flow mode:

  • Standard mode: 1 to 300 seconds

  • Express mode: 1 to 20 seconds

Attributes

AttributeTypeRequiredDescription
TypestringYesThe state type. Set to Wait.
NamestringYesThe state name.
SecondsintYesPause duration in seconds. Valid values: 1 to 300 (Standard mode) or 1 to 20 (Express mode). To set the value dynamically, use an expression (see Set the wait duration dynamically).
DescriptionstringNoA description of the state.
NextstringNoThe state to run after this one completes. Not required if End is true.
EndboolNoMarks this state as the terminal state of the current scope.
InputConstructormap[string]anyNoThe input constructor. For details, see the InputConstructor section in Inputs and outputs.
OutputConstructormap[string]anyNoThe output constructor. For details, see the OutputConstructor section in Inputs and outputs.

Examples

Wait a fixed number of seconds

The following flow pauses for 12 seconds before ending:

Type: StateMachine
Name: my-wkfl
SpecVersion: v1
StartAt: Wait1
States:
  - Type: Wait
    Name: Wait1
    Seconds: 12
    End: true

Set the wait duration dynamically

To determine the pause duration at runtime, use the .$ suffix on the Seconds field to read the value from the flow input.

Type: StateMachine
Name: my-wkfl
SpecVersion: v1
StartAt: DynamicWait
States:
  - Type: Wait
    Name: DynamicWait
    Seconds.$: $Input.timeout
    End: true

In this example, Seconds.$: $Input.timeout reads the timeout value from the flow input and uses it as the pause duration in seconds.