Skip to content

JobStateTimeLimitAction

Source code in docs_src/capo_batch/types/job_state_time_limit_action.py
class JobStateTimeLimitAction(TypedDict, closed=True):
    reason: NotRequired["capo_batch.types.string.String"]
    """<p>The reason to log for the action being taken.</p>"""
    state: NotRequired[
        "capo_batch.types.job_state_time_limit_actions_state.JobStateTimeLimitActionsState"
    ]
    """<p>The state of the job needed to trigger the action. The only supported value is <code>RUNNABLE</code>.</p>"""
    max_time_seconds: NotRequired["capo_batch.types.integer.Integer"]
    """<p>The approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken. The minimum value is 600 (10 minutes) and the maximum value is 86,400 (24 hours).</p>"""
    action: NotRequired[
        "capo_batch.types.job_state_time_limit_actions_action.JobStateTimeLimitActionsAction"
    ]
    """<p>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. For job queues connected to a <code>ECS</code>, <code>FARGATE</code> or <code>EKS</code> compute environment, the only supported value is <code>CANCEL</code>, which will cancel the job. For job queues connected to a <code>SAGEMAKER_TRAINING</code> service environment, the only supported value is <code>TERMINATE</code>, which will terminate the job.</p>"""

action instance-attribute

action: NotRequired[JobStateTimeLimitActionsAction]

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. For job queues connected to a ECS, FARGATE or EKS compute environment, the only supported value is CANCEL, which will cancel the job. For job queues connected to a SAGEMAKER_TRAINING service environment, the only supported value is TERMINATE, which will terminate the job.

max_time_seconds instance-attribute

max_time_seconds: NotRequired[Integer]

The approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken. The minimum value is 600 (10 minutes) and the maximum value is 86,400 (24 hours).

reason instance-attribute

reason: NotRequired[String]

The reason to log for the action being taken.

state instance-attribute

state: NotRequired[JobStateTimeLimitActionsState]

The state of the job needed to trigger the action. The only supported value is RUNNABLE.