Interface MultiNodeJobDefinitionProps
- All Superinterfaces:
JobDefinitionProps,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
MultiNodeJobDefinitionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:40:46.227Z")
@Stability(Stable)
public interface MultiNodeJobDefinitionProps
extends software.amazon.jsii.JsiiSerializable, JobDefinitionProps
Props to configure a MultiNodeJobDefinition.
Example:
MultiNodeJobDefinition multiNodeJob = MultiNodeJobDefinition.Builder.create(this, "JobDefinition")
.instanceType(InstanceType.of(InstanceClass.R4, InstanceSize.LARGE)) // optional, omit to let Batch choose the type for you
.containers(List.of(MultiNodeContainer.builder()
.container(EcsEc2ContainerDefinition.Builder.create(this, "mainMPIContainer")
.image(ContainerImage.fromRegistry("yourregsitry.com/yourMPIImage:latest"))
.cpu(256)
.memory(Size.mebibytes(2048))
.build())
.startNode(0)
.endNode(5)
.build()))
.build();
// convenience method
multiNodeJob.addContainer(MultiNodeContainer.builder()
.startNode(6)
.endNode(10)
.container(EcsEc2ContainerDefinition.Builder.create(this, "multiContainer")
.image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
.cpu(256)
.memory(Size.mebibytes(2048))
.build())
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forMultiNodeJobDefinitionPropsstatic final classAn implementation forMultiNodeJobDefinitionProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default List<MultiNodeContainer> The containers that this multinode job will run.default InstanceTypeThe instance type that this job definition will run.default NumberThe index of the main node in this job.default BooleanWhether to propagate tags from the JobDefinition to the ECS task that Batch spawns.Methods inherited from interface software.amazon.awscdk.services.batch.JobDefinitionProps
getJobDefinitionName, getParameters, getRetryAttempts, getRetryStrategies, getSchedulingPriority, getTimeoutMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getContainers
The containers that this multinode job will run.Default: none
- See Also:
-
getInstanceType
The instance type that this job definition will run.Default: - optimal instance, selected by Batch
-
getMainNode
The index of the main node in this job.The main node is responsible for orchestration.
Default: 0
-
getPropagateTags
Whether to propagate tags from the JobDefinition to the ECS task that Batch spawns.Default: false
-
builder
-