WaiterStateMachineProps

class aws_cdk.custom_resources.WaiterStateMachineProps(*, backoff_rate, interval, is_complete_handler, max_attempts, timeout_handler, disable_logging=None, log_options=None)

Bases: object

Initialization properties for the WaiterStateMachine construct.

Parameters:
  • backoff_rate (Union[int, float]) – Backoff between attempts.

  • interval (Duration) – The interval to wait between attempts.

  • is_complete_handler (IFunction) – The main handler that notifies if the waiter to decide ‘complete’ or ‘incomplete’.

  • max_attempts (Union[int, float]) – Number of attempts.

  • timeout_handler (IFunction) – The handler to call if the waiter times out and is incomplete.

  • disable_logging (Optional[bool]) – Whether logging for the state machine is disabled. Default: - false

  • log_options (Union[LogOptions, Dict[str, Any], None]) – Defines what execution history events are logged and where they are logged. Default: - A default log group will be created if logging is enabled.

ExampleMetadata:

fixture=_generated

Example:

# 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_logs as logs
from aws_cdk import aws_stepfunctions as stepfunctions
from aws_cdk import custom_resources

# function_: lambda.Function
# log_group: logs.LogGroup

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,
        include_execution_data=False,
        level=stepfunctions.LogLevel.OFF
    )
)

Attributes

backoff_rate

Backoff between attempts.

disable_logging

Whether logging for the state machine is disabled.

Default:
  • false

interval

The interval to wait between attempts.

is_complete_handler

The main handler that notifies if the waiter to decide ‘complete’ or ‘incomplete’.

log_options

Defines what execution history events are logged and where they are logged.

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

max_attempts

Number of attempts.

timeout_handler

The handler to call if the waiter times out and is incomplete.