Interface EcsEc2ContainerDefinitionProps
- All Superinterfaces:
EcsContainerDefinitionProps
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
EcsEc2ContainerDefinitionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:23:57.675Z")
@Stability(Stable)
public interface EcsEc2ContainerDefinitionProps
extends software.amazon.jsii.JsiiSerializable, EcsContainerDefinitionProps
Props to configure an EcsEc2ContainerDefinition.
Example:
IVpc vpc; EcsJobDefinition ecsJob = EcsJobDefinition.Builder.create(this, "JobDefn") .container(EcsEc2ContainerDefinition.Builder.create(this, "containerDefn") .image(ContainerImage.fromRegistry("public.ecr.aws/amazonlinux/amazonlinux:latest")) .memory(Size.mebibytes(2048)) .cpu(256) .build()) .build(); JobQueue queue = JobQueue.Builder.create(this, "JobQueue") .computeEnvironments(List.of(OrderedComputeEnvironment.builder() .computeEnvironment(ManagedEc2EcsComputeEnvironment.Builder.create(this, "managedEc2CE") .vpc(vpc) .build()) .order(1) .build())) .priority(10) .build(); User user = new User(this, "MyUser"); ecsJob.grantSubmitJob(user, queue);
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forEcsEc2ContainerDefinitionProps
static final class
An implementation forEcsEc2ContainerDefinitionProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Number
getGpu()
The number of physical GPUs to reserve for the container.default Boolean
When this parameter is true, the container is given elevated permissions on the host container instance (similar to the root user).Limits to set for the user this docker container will run as.Methods inherited from interface software.amazon.awscdk.services.batch.EcsContainerDefinitionProps
getCommand, getCpu, getEnvironment, getExecutionRole, getImage, getJobRole, getLinuxParameters, getLogging, getMemory, getReadonlyRootFilesystem, getSecrets, getUser, getVolumes
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getGpu
The number of physical GPUs to reserve for the container.Make sure that the number of GPUs reserved for all containers in a job doesn't exceed the number of available GPUs on the compute resource that the job is launched on.
Default: - no gpus
-
getPrivileged
When this parameter is true, the container is given elevated permissions on the host container instance (similar to the root user).Default: false
-
getUlimits
Limits to set for the user this docker container will run as.Default: - no ulimits
-
builder
-