# JobStateTimeLimitActionsReason

The reason to log for the action being taken.

- Source: [`aws-batch/lib/job-queue.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-batch/lib/job-queue.ts#L214)
- Type last changed: v2.143.0 · 24 May 2024

## Example

```ts
new batch.JobQueue(this, 'JobQueue', {
    jobStateTimeLimitActions: [
      {
        action: batch.JobStateTimeLimitActionsAction.CANCEL,
        maxTime: cdk.Duration.minutes(10),
        reason: batch.JobStateTimeLimitActionsReason.INSUFFICIENT_INSTANCE_CAPACITY,
        state: batch.JobStateTimeLimitActionsState.RUNNABLE,
      },
    ]
});
```

## Members

| Member | Description |
| --- | --- |
| `INSUFFICIENT_INSTANCE_CAPACITY` | All connected compute environments have insufficient capacity errors. |
| `COMPUTE_ENVIRONMENT_MAX_RESOURCE` | All compute environments have a maxvCpus parameter that is smaller than the job requirements. |
| `JOB_RESOURCE_REQUIREMENT` | None of the compute environments have instances that meet the job requirements. |

## Referenced by

- [`JobStateTimeLimitAction`](/v2/docs/aws-cdk-lib.aws_batch.JobStateTimeLimitAction).reason
