# WaiterStateMachineProps

Initialization properties for the `WaiterStateMachine` construct.

Extends: WaiterStateMachineProps
Used as props by: WaiterStateMachine

- Source: [`custom-resources/lib/provider-framework/waiter-state-machine.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/custom-resources/lib/provider-framework/waiter-state-machine.ts#L41)
- Type last changed: v2.139.0 · 24 Apr 2024

## 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,
  },
};
```

## Properties

- `backoffRate`: number (required) — Backoff between attempts.

- `disableLogging`: boolean = false — Whether logging for the state machine is disabled.

- `interval`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) (required) — The interval to wait between attempts.

- `isCompleteHandler`: [IFunction](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.IFunction.html) (required) — The main handler that notifies if the waiter to decide 'complete' or 'incomplete'.

- `logOptions`: [LogOptions](/cdk/api/v2/docs/aws-cdk-lib.custom_resources.LogOptions.html) — Defines what execution history events are logged and where they are logged.

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

- `maxAttempts`: number (required) — Number of attempts.

- `timeoutHandler`: [IFunction](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.IFunction.html) (required) — The handler to call if the waiter times out and is incomplete.
