Class JobStateTimeLimitAction.Builder
java.lang.Object
software.amazon.awscdk.services.batch.JobStateTimeLimitAction.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<JobStateTimeLimitAction>
- Enclosing interface:
JobStateTimeLimitAction
@Stability(Stable)
public static final class JobStateTimeLimitAction.Builder
extends Object
implements software.amazon.jsii.Builder<JobStateTimeLimitAction>
A builder for
JobStateTimeLimitAction
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction
(JobStateTimeLimitActionsAction action) Sets the value ofJobStateTimeLimitAction.getAction()
build()
Builds the configured instance.Sets the value ofJobStateTimeLimitAction.getMaxTime()
reason
(JobStateTimeLimitActionsReason reason) Sets the value ofJobStateTimeLimitAction.getReason()
Sets the value ofJobStateTimeLimitAction.getState()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
maxTime
Sets the value ofJobStateTimeLimitAction.getMaxTime()
- Parameters:
maxTime
- The approximate amount of time, that must pass with the job in the specified state before the action is taken. This parameter is required. The minimum value is 10 minutes and the maximum value is 24 hours.- Returns:
this
-
reason
@Stability(Stable) public JobStateTimeLimitAction.Builder reason(JobStateTimeLimitActionsReason reason) Sets the value ofJobStateTimeLimitAction.getReason()
- Parameters:
reason
- The reason to log for the action being taken. This parameter is required.- Returns:
this
-
action
@Stability(Stable) public JobStateTimeLimitAction.Builder action(JobStateTimeLimitActionsAction action) Sets the value ofJobStateTimeLimitAction.getAction()
- Parameters:
action
- 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.- Returns:
this
-
state
@Stability(Stable) public JobStateTimeLimitAction.Builder state(JobStateTimeLimitActionsState state) Sets the value ofJobStateTimeLimitAction.getState()
- Parameters:
state
- The state of the job needed to trigger the action.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<JobStateTimeLimitAction>
- Returns:
- a new instance of
JobStateTimeLimitAction
- Throws:
NullPointerException
- if any required attribute was not provided
-