Class JobDefinitionProps.Builder
java.lang.Object
software.amazon.awscdk.services.batch.JobDefinitionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<JobDefinitionProps>
- Enclosing interface:
JobDefinitionProps
@Stability(Stable)
public static final class JobDefinitionProps.Builder
extends Object
implements software.amazon.jsii.Builder<JobDefinitionProps>
A builder for
JobDefinitionProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.jobDefinitionName(String jobDefinitionName) Sets the value ofJobDefinitionProps.getJobDefinitionName()parameters(Map<String, ? extends Object> parameters) Sets the value ofJobDefinitionProps.getParameters()retryAttempts(Number retryAttempts) Sets the value ofJobDefinitionProps.getRetryAttempts()retryStrategies(List<? extends RetryStrategy> retryStrategies) Sets the value ofJobDefinitionProps.getRetryStrategies()schedulingPriority(Number schedulingPriority) Sets the value ofJobDefinitionProps.getSchedulingPriority()skipDeregisterOnUpdate(Boolean skipDeregisterOnUpdate) Sets the value ofJobDefinitionProps.getSkipDeregisterOnUpdate()Sets the value ofJobDefinitionProps.getTimeout()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
jobDefinitionName
Sets the value ofJobDefinitionProps.getJobDefinitionName()- Parameters:
jobDefinitionName- The name of this job definition.- Returns:
this
-
parameters
@Stability(Stable) public JobDefinitionProps.Builder parameters(Map<String, ? extends Object> parameters) Sets the value ofJobDefinitionProps.getParameters()- Parameters:
parameters- The default parameters passed to the container These parameters can be referenced in thecommandthat you give to the container.- Returns:
this
-
retryAttempts
Sets the value ofJobDefinitionProps.getRetryAttempts()- Parameters:
retryAttempts- The number of times to retry a job. The job is retried on failure the same number of attempts as the value.- Returns:
this
-
retryStrategies
@Stability(Stable) public JobDefinitionProps.Builder retryStrategies(List<? extends RetryStrategy> retryStrategies) Sets the value ofJobDefinitionProps.getRetryStrategies()- Parameters:
retryStrategies- Defines the retry behavior for this job.- Returns:
this
-
schedulingPriority
Sets the value ofJobDefinitionProps.getSchedulingPriority()- Parameters:
schedulingPriority- The priority of this Job. Only used in Fairshare Scheduling to decide which job to run first when there are multiple jobs with the same share identifier.- Returns:
this
-
skipDeregisterOnUpdate
@Stability(Stable) public JobDefinitionProps.Builder skipDeregisterOnUpdate(Boolean skipDeregisterOnUpdate) Sets the value ofJobDefinitionProps.getSkipDeregisterOnUpdate()- Parameters:
skipDeregisterOnUpdate- Specifies whether the previous revision of the job definition is retained in an active status after UPDATE events for the resource. When the property is set to false, the previous revision of the job definition is de-registered after a new revision is created. When the property is set to true, the previous revision of the job definition is not de-registered.- Returns:
this
-
timeout
Sets the value ofJobDefinitionProps.getTimeout()- Parameters:
timeout- The timeout time for jobs that are submitted with this job definition. After the amount of time you specify passes, Batch terminates your jobs if they aren't finished.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<JobDefinitionProps>- Returns:
- a new instance of
JobDefinitionProps - Throws:
NullPointerException- if any required attribute was not provided
-