Interface WaitProps

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

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:14.423Z") @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