Interface WaitProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
WaitProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-06T14:43:27.768Z") @Stability(Stable) public interface WaitProps extends software.amazon.jsii.JsiiSerializable
Properties for defining a Wait state.

Example:

 EvaluateExpression convertToSeconds = EvaluateExpression.Builder.create(this, "Convert to seconds")
         .expression("$.waitMilliseconds / 1000")
         .resultPath("$.waitSeconds")
         .build();
 EvaluateExpression createMessage = EvaluateExpression.Builder.create(this, "Create message")
         // Note: this is a string inside a string.
         .expression("`Now waiting ${$.waitSeconds} seconds...`")
         .runtime(Runtime.NODEJS_LATEST)
         .resultPath("$.message")
         .build();
 SnsPublish publishMessage = SnsPublish.Builder.create(this, "Publish message")
         .topic(new Topic(this, "cool-topic"))
         .message(TaskInput.fromJsonPathAt("$.message"))
         .resultPath("$.sns")
         .build();
 Wait wait = Wait.Builder.create(this, "Wait")
         .time(WaitTime.secondsPath("$.waitSeconds"))
         .build();
 StateMachine.Builder.create(this, "StateMachine")
         .definition(convertToSeconds.next(createMessage).next(publishMessage).next(wait))
         .build();
 
  • Method Details

    • getTime

      @Stability(Stable) @NotNull WaitTime getTime()
      Wait duration.
    • getComment

      @Stability(Stable) @Nullable default String getComment()
      An optional description for this state.

      Default: No comment

    • getStateName

      @Stability(Stable) @Nullable default String getStateName()
      Optional name for this state.

      Default: - The construct ID will be used as state name

    • builder

      @Stability(Stable) static WaitProps.Builder builder()
      Returns:
      a WaitProps.Builder of WaitProps