Skip to content
v2.277.0

WaiterStateMachineProps Struct ​

Initialization properties for the WaiterStateMachine construct.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_lambda as lambda } from 'aws-cdk-lib';
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';
import { custom_resources } from 'aws-cdk-lib';
import { aws_logs as interfaces_logs } from 'aws-cdk-lib/interfaces';

declare const function_: lambda.Function;
declare const logGroupRef: interfaces_logs.ILogGroupRef;
const waiterStateMachineProps: custom_resources.WaiterStateMachineProps = {
  backoffRate: 123,
  interval: cdk.Duration.minutes(30),
  isCompleteHandler: function_,
  maxAttempts: 123,
  timeoutHandler: function_,

  // the properties below are optional
  disableLogging: false,
  logOptions: {
    destination: logGroupRef,
    includeExecutionData: false,
    level: stepfunctions.LogLevel.OFF,
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_lambda as lambda_
from aws_cdk import aws_stepfunctions as stepfunctions
from aws_cdk import custom_resources
from aws_cdk.interfaces import aws_logs as interfaces_logs

# function_: lambda.Function
# log_group_ref: interfaces_logs.ILogGroupRef

waiter_state_machine_props = custom_resources.WaiterStateMachineProps(
    backoff_rate=123,
    interval=cdk.Duration.minutes(30),
    is_complete_handler=function_,
    max_attempts=123,
    timeout_handler=function_,

    # the properties below are optional
    disable_logging=False,
    log_options=custom_resources.LogOptions(
        destination=log_group_ref,
        include_execution_data=False,
        level=stepfunctions.LogLevel.OFF
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.lambda.*;
import software.amazon.awscdk.services.stepfunctions.*;
import software.amazon.awscdk.customresources.*;
import software.amazon.awscdk.interfaces.logs.*;

Function function_;
ILogGroupRef logGroupRef;

WaiterStateMachineProps waiterStateMachineProps = WaiterStateMachineProps.builder()
        .backoffRate(123)
        .interval(Duration.minutes(30))
        .isCompleteHandler(function_)
        .maxAttempts(123)
        .timeoutHandler(function_)

        // the properties below are optional
        .disableLogging(false)
        .logOptions(LogOptions.builder()
                .destination(logGroupRef)
                .includeExecutionData(false)
                .level(LogLevel.OFF)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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.StepFunctions;
using Amazon.CDK.CustomResources;
using Amazon.CDK.Interfaces.Logs;

Function function_;
ILogGroupRef logGroupRef;

var waiterStateMachineProps = 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 = logGroupRef,
        IncludeExecutionData = false,
        Level = LogLevel.OFF
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var function_ Function
var logGroupRef ILogGroupRef

waiterStateMachineProps := &WaiterStateMachineProps{
	BackoffRate: jsii.Number(123),
	Interval: cdk.Duration_Minutes(jsii.Number(30)),
	IsCompleteHandler: function_,
	MaxAttempts: jsii.Number(123),
	TimeoutHandler: function_,

	// the properties below are optional
	DisableLogging: jsii.Boolean(false),
	LogOptions: &LogOptions{
		Destination: logGroupRef,
		IncludeExecutionData: jsii.Boolean(false),
		Level: awscdk.Aws_stepfunctions.LogLevel_OFF,
	},
}

Properties ​

backoffRatenumberbackoff_rateint | floatbackoffRateNumberBackoffRatedoubleBackoffRate*float64 required #
Backoff between attempts.
disableLoggingoptionalbooleandisable_loggingoptionalbooldisableLoggingoptionalBooleanDisableLoggingoptionalboolDisableLoggingoptional*bool = false #
Whether logging for the state machine is disabled.
intervalDurationintervalDurationintervalDurationIntervalDurationIntervalDuration required #
The interval to wait between attempts.
isCompleteHandlerIFunctionis_complete_handlerIFunctionisCompleteHandlerIFunctionIsCompleteHandlerIFunctionIsCompleteHandlerIFunction required #
The main handler that notifies if the waiter to decide 'complete' or 'incomplete'.
logOptionsoptionalLogOptionslog_optionsoptionalLogOptionslogOptionsoptionalLogOptionsLogOptionsoptionalLogOptionsLogOptionsoptionalLogOptions #
Defines what execution history events are logged and where they are logged.

Default: A default log group will be created if logging is enabled.

maxAttemptsnumbermax_attemptsint | floatmaxAttemptsNumberMaxAttemptsdoubleMaxAttempts*float64 required #
Number of attempts.
timeoutHandlerIFunctiontimeout_handlerIFunctiontimeoutHandlerIFunctionTimeoutHandlerIFunctionTimeoutHandlerIFunction required #
The handler to call if the waiter times out and is incomplete.