interface JobStateTimeLimitAction
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Batch.JobStateTimeLimitAction |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsbatch#JobStateTimeLimitAction |
![]() | software.amazon.awscdk.services.batch.JobStateTimeLimitAction |
![]() | aws_cdk.aws_batch.JobStateTimeLimitAction |
![]() | aws-cdk-lib » aws_batch » JobStateTimeLimitAction |
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
// 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
Name | Type | Description |
---|---|---|
max | Duration | The approximate amount of time, that must pass with the job in the specified state before the action is taken. |
reason | Job | The reason to log for the action being taken. |
action? | Job | 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. |
state? | Job | The state of the job needed to trigger the action. |
maxTime
Type:
Duration
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.
reason
Type:
Job
The reason to log for the action being taken.
action?
Type:
Job
(optional, default: JobStateTimeLimitActionsAction.CANCEL)
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.
state?
Type:
Job
(optional, default: JobStateTimeLimitActionsState.RUNNABLE)
The state of the job needed to trigger the action.