Class CfnJobQueue.JobStateTimeLimitActionProperty.Builder
java.lang.Object
software.amazon.awscdk.services.batch.CfnJobQueue.JobStateTimeLimitActionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnJobQueue.JobStateTimeLimitActionProperty>
- Enclosing interface:
CfnJobQueue.JobStateTimeLimitActionProperty
@Stability(Stable)
public static final class CfnJobQueue.JobStateTimeLimitActionProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnJobQueue.JobStateTimeLimitActionProperty>
A builder for
CfnJobQueue.JobStateTimeLimitActionProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnJobQueue.JobStateTimeLimitActionProperty.getAction()
build()
Builds the configured instance.maxTimeSeconds
(Number maxTimeSeconds) Sets the value ofCfnJobQueue.JobStateTimeLimitActionProperty.getMaxTimeSeconds()
Sets the value ofCfnJobQueue.JobStateTimeLimitActionProperty.getReason()
Sets the value ofCfnJobQueue.JobStateTimeLimitActionProperty.getState()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
action
Sets the value ofCfnJobQueue.JobStateTimeLimitActionProperty.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. This parameter is required. The only supported value isCANCEL
, which will cancel the job.- Returns:
this
-
maxTimeSeconds
@Stability(Stable) public CfnJobQueue.JobStateTimeLimitActionProperty.Builder maxTimeSeconds(Number maxTimeSeconds) Sets the value ofCfnJobQueue.JobStateTimeLimitActionProperty.getMaxTimeSeconds()
- Parameters:
maxTimeSeconds
- The approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken. This parameter is required. The minimum value is 600 (10 minutes) and the maximum value is 86,400 (24 hours).- Returns:
this
-
reason
Sets the value ofCfnJobQueue.JobStateTimeLimitActionProperty.getReason()
- Parameters:
reason
- The reason to log for the action being taken. This parameter is required.- Returns:
this
-
state
Sets the value ofCfnJobQueue.JobStateTimeLimitActionProperty.getState()
- Parameters:
state
- The state of the job needed to trigger the action. This parameter is required. The only supported value isRUNNABLE
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnJobQueue.JobStateTimeLimitActionProperty>
- Returns:
- a new instance of
CfnJobQueue.JobStateTimeLimitActionProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-