Interface JobDefinitionContainer

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
JobDefinitionContainer.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:47.662Z") @Stability(Experimental) public interface JobDefinitionContainer extends software.amazon.jsii.JsiiSerializable
(experimental) Properties of a job definition container.

Example:

 import software.amazon.awscdk.services.ssm.*;
 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();
 
  • Method Details

    • getImage

      @Stability(Experimental) @NotNull ContainerImage getImage()
      (experimental) The image used to start a container.
    • getAssignPublicIp

      @Stability(Experimental) @Nullable default Boolean getAssignPublicIp()
      (experimental) Whether or not to assign a public IP to the job.

      Default: - false

    • getCommand

      @Stability(Experimental) @Nullable default List<String> getCommand()
      (experimental) The command that is passed to the container.

      If you provide a shell command as a single string, you have to quote command-line arguments.

      Default: - CMD value built into container image.

    • getEnvironment

      @Stability(Experimental) @Nullable default Map<String,String> getEnvironment()
      (experimental) The environment variables to pass to the container.

      Default: none

    • getExecutionRole

      @Stability(Experimental) @Nullable default IRole getExecutionRole()
      (experimental) The IAM role that AWS Batch can assume.

      Required when using Fargate.

      Default: - None

    • getGpuCount

      @Stability(Experimental) @Nullable default Number getGpuCount()
      (experimental) The number of physical GPUs to reserve for the container.

      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.

    • getInstanceType

      @Stability(Experimental) @Nullable default InstanceType getInstanceType()
      (experimental) The instance type to use for a multi-node parallel job.

      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

    • getJobRole

      @Stability(Experimental) @Nullable default IRole getJobRole()
      (experimental) The IAM role that the container can assume for AWS permissions.

      Default: - An IAM role will created.

    • getLinuxParams

      @Stability(Experimental) @Nullable default LinuxParameters getLinuxParams()
      (experimental) Linux-specific modifications that are applied to the container, such as details for device mappings.

      For now, only the devices property is supported.

      Default: - None will be used.

    • getLogConfiguration

      @Stability(Experimental) @Nullable default LogConfiguration getLogConfiguration()
      (experimental) The log configuration specification for the container.

      Default: - containers use the same logging driver that the Docker daemon uses

    • getMemoryLimitMiB

      @Stability(Experimental) @Nullable default Number getMemoryLimitMiB()
      (experimental) The hard limit (in MiB) of memory to present to the container.

      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

    • getMountPoints

      @Stability(Experimental) @Nullable default List<MountPoint> getMountPoints()
      (experimental) The mount points for data volumes in your container.

      Default: - No mount points will be used.

    • getPlatformVersion

      @Stability(Experimental) @Nullable default FargatePlatformVersion getPlatformVersion()
      (experimental) Fargate platform version.

      Default: - LATEST platform version will be used

    • getPrivileged

      @Stability(Experimental) @Nullable 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: false

    • getReadOnly

      @Stability(Experimental) @Nullable default Boolean getReadOnly()
      (experimental) When this parameter is true, the container is given read-only access to its root file system.

      Default: false

    • getUlimits

      @Stability(Experimental) @Nullable default List<Ulimit> getUlimits()
      (experimental) A list of ulimits to set in the container.

      Default: - No limits.

    • getUser

      @Stability(Experimental) @Nullable default String getUser()
      (experimental) The user name to use inside the container.

      Default: - None will be used.

    • getVcpus

      @Stability(Experimental) @Nullable default Number getVcpus()
      (experimental) The number of vCPUs reserved for the container.

      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

    • getVolumes

      @Stability(Experimental) @Nullable default List<Volume> getVolumes()
      (experimental) A list of data volumes used in a job.

      Default: - No data volumes will be used.

    • builder

      @Stability(Experimental) static JobDefinitionContainer.Builder builder()
      Returns:
      a JobDefinitionContainer.Builder of JobDefinitionContainer