Skip to content
v2.274.0

JobStateTimeLimitAction Struct ​

Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.

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_batch as batch } from 'aws-cdk-lib';
const jobStateTimeLimitAction: batch.JobStateTimeLimitAction = {
  maxTime: cdk.Duration.minutes(30),
  reason: batch.JobStateTimeLimitActionsReason.INSUFFICIENT_INSTANCE_CAPACITY,

  // the properties below are optional
  action: batch.JobStateTimeLimitActionsAction.CANCEL,
  state: batch.JobStateTimeLimitActionsState.RUNNABLE,
};

Properties ​

The action to take when a job is at the head of the job queue in the specified state for the specified period of time.

Default: JobStateTimeLimitActionsAction.CANCEL

maxTimeDurationmax_timeDurationmaxTimeDurationMaxTimeDurationMaxTimeDurationrequired#
The approximate amount of time, that must pass with the job in the specified state before the action is taken.

The minimum value is 10 minutes and the maximum value is 24 hours.

The state of the job needed to trigger the action.

Default: JobStateTimeLimitActionsState.RUNNABLE