Class MultiNodeJobDefinition.Builder
java.lang.Object
software.amazon.awscdk.services.batch.MultiNodeJobDefinition.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<MultiNodeJobDefinition>
- Enclosing class:
MultiNodeJobDefinition
@Stability(Stable)
public static final class MultiNodeJobDefinition.Builder
extends Object
implements software.amazon.jsii.Builder<MultiNodeJobDefinition>
A fluent builder for
MultiNodeJobDefinition
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
containers
(List<? extends MultiNodeContainer> containers) The containers that this multinode job will run.instanceType
(InstanceType instanceType) The instance type that this job definition will run.jobDefinitionName
(String jobDefinitionName) The name of this job definition.The index of the main node in this job.parameters
(Map<String, ? extends Object> parameters) The default parameters passed to the container These parameters can be referenced in thecommand
that you give to the container.propagateTags
(Boolean propagateTags) Whether to propogate tags from the JobDefinition to the ECS task that Batch spawns.retryAttempts
(Number retryAttempts) The number of times to retry a job.retryStrategies
(List<? extends RetryStrategy> retryStrategies) Defines the retry behavior for this job.schedulingPriority
(Number schedulingPriority) The priority of this Job.The timeout time for jobs that are submitted with this job definition.
-
Method Details
-
create
@Stability(Stable) public static MultiNodeJobDefinition.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
MultiNodeJobDefinition.Builder
.
-
jobDefinitionName
@Stability(Stable) public MultiNodeJobDefinition.Builder jobDefinitionName(String jobDefinitionName) The name of this job definition.Default: - generated by CloudFormation
- Parameters:
jobDefinitionName
- The name of this job definition. This parameter is required.- Returns:
this
-
parameters
@Stability(Stable) public MultiNodeJobDefinition.Builder parameters(Map<String, ? extends Object> parameters) The default parameters passed to the container These parameters can be referenced in thecommand
that you give to the container.Default: none
- Parameters:
parameters
- The default parameters passed to the container These parameters can be referenced in thecommand
that you give to the container. This parameter is required.- Returns:
this
- See Also:
-
retryAttempts
The number of times to retry a job.The job is retried on failure the same number of attempts as the value.
Default: 1
- Parameters:
retryAttempts
- The number of times to retry a job. This parameter is required.- Returns:
this
-
retryStrategies
@Stability(Stable) public MultiNodeJobDefinition.Builder retryStrategies(List<? extends RetryStrategy> retryStrategies) Defines the retry behavior for this job.Default: - no `RetryStrategy`
- Parameters:
retryStrategies
- Defines the retry behavior for this job. This parameter is required.- Returns:
this
-
schedulingPriority
@Stability(Stable) public MultiNodeJobDefinition.Builder schedulingPriority(Number 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.
Default: none
- Parameters:
schedulingPriority
- The priority of this Job. This parameter is required.- Returns:
this
-
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.
Default: - no timeout
- Parameters:
timeout
- The timeout time for jobs that are submitted with this job definition. This parameter is required.- Returns:
this
-
containers
@Stability(Stable) public MultiNodeJobDefinition.Builder containers(List<? extends MultiNodeContainer> containers) The containers that this multinode job will run.Default: none
- Parameters:
containers
- The containers that this multinode job will run. This parameter is required.- Returns:
this
- See Also:
-
instanceType
The instance type that this job definition will run.Default: - optimal instance, selected by Batch
- Parameters:
instanceType
- The instance type that this job definition will run. This parameter is required.- Returns:
this
-
mainNode
The index of the main node in this job.The main node is responsible for orchestration.
Default: 0
- Parameters:
mainNode
- The index of the main node in this job. This parameter is required.- Returns:
this
-
propagateTags
Whether to propogate tags from the JobDefinition to the ECS task that Batch spawns.Default: false
- Parameters:
propagateTags
- Whether to propogate tags from the JobDefinition to the ECS task that Batch spawns. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<MultiNodeJobDefinition>
- Returns:
- a newly built instance of
MultiNodeJobDefinition
.
-