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(Experimental)
public static final class JobDefinitionProps.Builder
extends Object
implements software.amazon.jsii.Builder<JobDefinitionProps>
A builder for
JobDefinitionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.container
(JobDefinitionContainer container) Sets the value ofJobDefinitionProps.getContainer()
jobDefinitionName
(String jobDefinitionName) Sets the value ofJobDefinitionProps.getJobDefinitionName()
nodeProps
(IMultiNodeProps nodeProps) Sets the value ofJobDefinitionProps.getNodeProps()
parameters
(Map<String, String> parameters) Sets the value ofJobDefinitionProps.getParameters()
platformCapabilities
(List<? extends PlatformCapabilities> platformCapabilities) Sets the value ofJobDefinitionProps.getPlatformCapabilities()
retryAttempts
(Number retryAttempts) Sets the value ofJobDefinitionProps.getRetryAttempts()
Sets the value ofJobDefinitionProps.getTimeout()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
container
@Stability(Experimental) public JobDefinitionProps.Builder container(JobDefinitionContainer container) Sets the value ofJobDefinitionProps.getContainer()
- Parameters:
container
- An object with various properties specific to container-based jobs. This parameter is required.- Returns:
this
-
jobDefinitionName
@Stability(Experimental) public JobDefinitionProps.Builder jobDefinitionName(String jobDefinitionName) Sets the value ofJobDefinitionProps.getJobDefinitionName()
- Parameters:
jobDefinitionName
- The name of the job definition. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.- Returns:
this
-
nodeProps
Sets the value ofJobDefinitionProps.getNodeProps()
- Parameters:
nodeProps
- An object with various properties specific to multi-node parallel jobs.- Returns:
this
-
parameters
@Stability(Experimental) public JobDefinitionProps.Builder parameters(Map<String, String> parameters) Sets the value ofJobDefinitionProps.getParameters()
- Parameters:
parameters
- When you submit a job, you can specify parameters that should replace the placeholders or override the default job definition parameters. Parameters in job submission requests take precedence over the defaults in a job definition. This allows you to use the same job definition for multiple jobs that use the same format, and programmatically change values in the command at submission time.- Returns:
this
-
platformCapabilities
@Stability(Experimental) public JobDefinitionProps.Builder platformCapabilities(List<? extends PlatformCapabilities> platformCapabilities) Sets the value ofJobDefinitionProps.getPlatformCapabilities()
- Parameters:
platformCapabilities
- The platform capabilities required by the job definition.- Returns:
this
-
retryAttempts
Sets the value ofJobDefinitionProps.getRetryAttempts()
- Parameters:
retryAttempts
- The number of times to move a job to the RUNNABLE status. You may specify between 1 and 10 attempts. If the value of attempts is greater than one, the job is retried on failure the same number of attempts as the value.- Returns:
this
-
timeout
Sets the value ofJobDefinitionProps.getTimeout()
- Parameters:
timeout
- The timeout configuration for jobs that are submitted with this job definition. You can specify a timeout duration after which AWS Batch terminates your jobs if they have not finished.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<JobDefinitionProps>
- Returns:
- a new instance of
JobDefinitionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-