@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:43.427Z") @Stability(value=Experimental) public interface JobDefinitionContainer extends software.amazon.jsii.JsiiSerializable
Example:
import software.amazon.awscdk.core.*;
JobDefinition.Builder.create(this, "job-def")
.container(JobDefinitionContainer.builder()
.image(EcrImage.fromRegistry("docker/whalesay"))
.logConfiguration(LogConfiguration.builder()
.logDriver(LogDriver.AWSLOGS)
.options(Map.of("awslogs-region", "us-east-1"))
.secretOptions(List.of(ExposedSecret.fromParametersStore("xyz", StringParameter.fromStringParameterName(this, "parameter", "xyz"))))
.build())
.build())
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
JobDefinitionContainer.Builder
A builder for
JobDefinitionContainer |
static class |
JobDefinitionContainer.Jsii$Proxy
An implementation for
JobDefinitionContainer |
| Modifier and Type | Method and Description |
|---|---|
static JobDefinitionContainer.Builder |
builder() |
default Boolean |
getAssignPublicIp()
(experimental) Whether or not to assign a public IP to the job.
|
default List<String> |
getCommand()
(experimental) The command that is passed to the container.
|
default Map<String,String> |
getEnvironment()
(experimental) The environment variables to pass to the container.
|
default IRole |
getExecutionRole()
(experimental) The IAM role that AWS Batch can assume.
|
default Number |
getGpuCount()
(experimental) The number of physical GPUs to reserve for the container.
|
ContainerImage |
getImage()
(experimental) The image used to start a container.
|
default InstanceType |
getInstanceType()
(experimental) The instance type to use for a multi-node parallel job.
|
default IRole |
getJobRole()
(experimental) The IAM role that the container can assume for AWS permissions.
|
default LinuxParameters |
getLinuxParams()
(experimental) Linux-specific modifications that are applied to the container, such as details for device mappings.
|
default LogConfiguration |
getLogConfiguration()
(experimental) The log configuration specification for the container.
|
default Number |
getMemoryLimitMiB()
(experimental) The hard limit (in MiB) of memory to present to the container.
|
default List<MountPoint> |
getMountPoints()
(experimental) The mount points for data volumes in your container.
|
default FargatePlatformVersion |
getPlatformVersion()
(experimental) Fargate platform version.
|
default Boolean |
getPrivileged()
(experimental) When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user).
|
default Boolean |
getReadOnly()
(experimental) When this parameter is true, the container is given read-only access to its root file system.
|
default List<Ulimit> |
getUlimits()
(experimental) A list of ulimits to set in the container.
|
default String |
getUser()
(experimental) The user name to use inside the container.
|
default Number |
getVcpus()
(experimental) The number of vCPUs reserved for the container.
|
default List<Volume> |
getVolumes()
(experimental) A list of data volumes used in a job.
|
@Stability(value=Experimental) @NotNull ContainerImage getImage()
@Stability(value=Experimental) @Nullable default Boolean getAssignPublicIp()
Default: - false
@Stability(value=Experimental) @Nullable default List<String> getCommand()
If you provide a shell command as a single string, you have to quote command-line arguments.
Default: - CMD value built into container image.
@Stability(value=Experimental) @Nullable default Map<String,String> getEnvironment()
Default: none
@Stability(value=Experimental) @Nullable default IRole getExecutionRole()
Required when using Fargate.
Default: - None
@Stability(value=Experimental) @Nullable default Number getGpuCount()
The number of GPUs reserved for all containers in a job should not exceed the number of available GPUs on the compute resource that the job is launched on.
Default: - No GPU reservation.
@Stability(value=Experimental) @Nullable default InstanceType getInstanceType()
Currently all node groups in a multi-node parallel job must use the same instance type. This parameter is not valid for single-node container jobs.
Default: - None
@Stability(value=Experimental) @Nullable default IRole getJobRole()
Default: - An IAM role will created.
@Stability(value=Experimental) @Nullable default LinuxParameters getLinuxParams()
For now, only the devices property is supported.
Default: - None will be used.
@Stability(value=Experimental) @Nullable default LogConfiguration getLogConfiguration()
Default: - containers use the same logging driver that the Docker daemon uses
@Stability(value=Experimental) @Nullable default Number getMemoryLimitMiB()
If your container attempts to exceed the memory specified here, the container is killed. You must specify at least 4 MiB of memory for EC2 and 512 MiB for Fargate.
Default: - 4 for EC2, 512 for Fargate
@Stability(value=Experimental) @Nullable default List<MountPoint> getMountPoints()
Default: - No mount points will be used.
@Stability(value=Experimental) @Nullable default FargatePlatformVersion getPlatformVersion()
Default: - LATEST platform version will be used
@Stability(value=Experimental) @Nullable default Boolean getPrivileged()
Default: false
@Stability(value=Experimental) @Nullable default Boolean getReadOnly()
Default: false
@Stability(value=Experimental) @Nullable default List<Ulimit> getUlimits()
Default: - No limits.
@Stability(value=Experimental) @Nullable default String getUser()
Default: - None will be used.
@Stability(value=Experimental) @Nullable default Number getVcpus()
Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU for EC2 and 0.25 for Fargate.
Default: - 1 for EC2, 0.25 for Fargate
@Stability(value=Experimental) @Nullable default List<Volume> getVolumes()
Default: - No data volumes will be used.
@Stability(value=Experimental) static JobDefinitionContainer.Builder builder()
JobDefinitionContainer.Builder of JobDefinitionContainerCopyright © 2022. All rights reserved.