Class WaiterStateMachine
A very simple StateMachine construct highly customized to the provider framework.
Inheritance
Namespace: Amazon.CDK.CustomResources
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class WaiterStateMachine : Construct
Syntax (vb)
Public Class WaiterStateMachine
Inherits Construct
Remarks
We previously used CfnResource
instead of CfnStateMachine
to avoid depending
on aws-stepfunctions
module, but now it is okay.
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.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.Lambda;
using Amazon.CDK.AWS.Logs;
using Amazon.CDK.AWS.StepFunctions;
using Amazon.CDK.CustomResources;
Function function_;
LogGroup logGroup;
var waiterStateMachine = new WaiterStateMachine(this, "MyWaiterStateMachine", new WaiterStateMachineProps {
BackoffRate = 123,
Interval = Duration.Minutes(30),
IsCompleteHandler = function_,
MaxAttempts = 123,
TimeoutHandler = function_,
// the properties below are optional
DisableLogging = false,
LogOptions = new LogOptions {
Destination = logGroup,
IncludeExecutionData = false,
Level = LogLevel.OFF
}
});
Synopsis
Constructors
Waiter |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Waiter |
Used by jsii to construct an instance of this class from DeputyProps |
Waiter |
Properties
State |
The ARN of the state machine. |
Methods
Grant |
Grant the given identity permissions on StartExecution of the state machine. |
Constructors
WaiterStateMachine(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected WaiterStateMachine(ByRefValue reference)
Parameters
- reference Amazon.
JSII. Runtime. Deputy. By Ref Value The Javascript-owned object reference
WaiterStateMachine(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected WaiterStateMachine(DeputyBase.DeputyProps props)
Parameters
- props Amazon.
JSII. Runtime. Deputy. Deputy Base. Deputy Props The deputy props
WaiterStateMachine(Construct, String, IWaiterStateMachineProps)
public WaiterStateMachine(Construct scope, string id, IWaiterStateMachineProps props)
Parameters
- scope Constructs.
Construct - id System.
String - props IWaiter
State Machine Props
Properties
StateMachineArn
The ARN of the state machine.
public virtual string StateMachineArn { get; }
Property Value
System.
Methods
GrantStartExecution(IGrantable)
Grant the given identity permissions on StartExecution of the state machine.
public virtual Grant GrantStartExecution(IGrantable identity)
Parameters
- identity IGrantable
Returns