Class LinuxParameters.Builder

java.lang.Object
software.amazon.awscdk.services.batch.LinuxParameters.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<LinuxParameters>
Enclosing class:
LinuxParameters

@Stability(Stable) public static final class LinuxParameters.Builder extends Object implements software.amazon.jsii.Builder<LinuxParameters>
A fluent builder for LinuxParameters.
  • Method Details

    • create

      @Stability(Stable) public static LinuxParameters.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of LinuxParameters.Builder.
    • initProcessEnabled

      @Stability(Stable) public LinuxParameters.Builder initProcessEnabled(Boolean initProcessEnabled)
      Specifies whether to run an init process inside the container that forwards signals and reaps processes.

      Default: false

      Parameters:
      initProcessEnabled - Specifies whether to run an init process inside the container that forwards signals and reaps processes. This parameter is required.
      Returns:
      this
    • maxSwap

      @Stability(Stable) public LinuxParameters.Builder maxSwap(Size maxSwap)
      The total amount of swap memory a container can use.

      This parameter will be translated to the --memory-swap option to docker run.

      This parameter is only supported when you are using the EC2 launch type. Accepted values are positive integers.

      Default: No swap.

      Parameters:
      maxSwap - The total amount of swap memory a container can use. This parameter is required.
      Returns:
      this
    • sharedMemorySize

      @Stability(Stable) public LinuxParameters.Builder sharedMemorySize(Size sharedMemorySize)
      The value for the size of the /dev/shm volume.

      Default: No shared memory.

      Parameters:
      sharedMemorySize - The value for the size of the /dev/shm volume. This parameter is required.
      Returns:
      this
    • swappiness

      @Stability(Stable) public LinuxParameters.Builder swappiness(Number swappiness)
      This allows you to tune a container's memory swappiness behavior.

      This parameter maps to the --memory-swappiness option to docker run. The swappiness relates to the kernel's tendency to swap memory. A value of 0 will cause swapping to not happen unless absolutely necessary. A value of 100 will cause pages to be swapped very aggressively.

      This parameter is only supported when you are using the EC2 launch type. Accepted values are whole numbers between 0 and 100. If a value is not specified for maxSwap then this parameter is ignored.

      Default: 60

      Parameters:
      swappiness - This allows you to tune a container's memory swappiness behavior. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public LinuxParameters build()
      Specified by:
      build in interface software.amazon.jsii.Builder<LinuxParameters>
      Returns:
      a newly built instance of LinuxParameters.