Class WaiterStateMachine

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.integtests.alpha.WaiterStateMachine
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-09-24T10:56:41.804Z") @Stability(Experimental) public class WaiterStateMachine extends software.constructs.Construct
(experimental) A very simple StateMachine construct highly customized to the provider framework.

This is so that this package does not need to depend on aws-stepfunctions module.

The state machine continuously calls the isCompleteHandler, until it succeeds or times out. The handler is called maxAttempts times with an interval duration and a backoffRate rate.

For example with:

  • maxAttempts = 360 (30 minutes)
  • interval = 5
  • backoffRate = 1 (no backoff)

it will make the API Call every 5 seconds and fail after 360 failures.

If the backoff rate is changed to 2 (for example), it will

  • make the first call
  • wait 5 seconds
  • make the second call
  • wait 15 seconds
  • etc.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.integtests.alpha.*;
 import software.amazon.awscdk.*;
 WaiterStateMachine waiterStateMachine = WaiterStateMachine.Builder.create(this, "MyWaiterStateMachine")
         .backoffRate(123)
         .interval(Duration.minutes(30))
         .totalTimeout(Duration.minutes(30))
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    (experimental) A fluent builder for WaiterStateMachine.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    WaiterStateMachine(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    WaiterStateMachine(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    WaiterStateMachine(software.constructs.Construct scope, String id)
     
     
    WaiterStateMachine(software.constructs.Construct scope, String id, WaiterStateMachineProps props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (experimental) The AssertionsProvide that handles async requests.
    (experimental) The IAM Role ARN of the role used by the state machine.
    (experimental) The ARN of the statemachine.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • WaiterStateMachine

      protected WaiterStateMachine(software.amazon.jsii.JsiiObjectRef objRef)
    • WaiterStateMachine

      protected WaiterStateMachine(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • WaiterStateMachine

      @Stability(Experimental) public WaiterStateMachine(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable WaiterStateMachineProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • WaiterStateMachine

      @Stability(Experimental) public WaiterStateMachine(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • getIsCompleteProvider

      @Stability(Experimental) @NotNull public AssertionsProvider getIsCompleteProvider()
      (experimental) The AssertionsProvide that handles async requests.
    • getRoleArn

      @Stability(Experimental) @NotNull public String getRoleArn()
      (experimental) The IAM Role ARN of the role used by the state machine.
    • getStateMachineArn

      @Stability(Experimental) @NotNull public String getStateMachineArn()
      (experimental) The ARN of the statemachine.