# JitterType

Values allowed in the retrier JitterStrategy field.

- Source: [`aws-stepfunctions/lib/types.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-stepfunctions/lib/types.ts#L40)
- Type last changed: v2.95.0 · 7 Sep 2023

## Example

```ts
const parallel = new sfn.Parallel(this, 'Do the work in parallel');

// Add branches to be executed in parallel
const shipItem = new sfn.Pass(this, 'ShipItem');
const sendInvoice = new sfn.Pass(this, 'SendInvoice');
const restock = new sfn.Pass(this, 'Restock');
parallel.branch(shipItem);
parallel.branch(sendInvoice);
parallel.branch(restock);

// Retry the whole workflow if something goes wrong with exponential backoff
parallel.addRetry({
  maxAttempts: 1,
  maxDelay: Duration.seconds(5),
  jitterStrategy: sfn.JitterType.FULL,
});

// How to recover from errors
const sendFailureNotification = new sfn.Pass(this, 'SendFailureNotification');
parallel.addCatch(sendFailureNotification);

// What to do in case everything succeeded
const closeOrder = new sfn.Pass(this, 'CloseOrder');
parallel.next(closeOrder);
```

## Members

| Member | Description |
| --- | --- |
| `FULL` | Calculates the delay to be a random number between 0 and the computed backoff for the given retry attempt count. |
| `NONE` | Calculates the delay to be the computed backoff for the given retry attempt count (equivalent to if Jitter was not declared - i.e. the default value). |

## Referenced by

- [`RetryProps`](/v2/docs/aws-cdk-lib.aws_stepfunctions.RetryProps).jitterStrategy
