Class LinuxParameters

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.ecs.LinuxParameters
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:29.331Z") @Stability(Stable) public class LinuxParameters extends software.constructs.Construct
Linux-specific options that are applied to the container.

Example:

 TaskDefinition taskDefinition;
 taskDefinition.addContainer("container", ContainerDefinitionOptions.builder()
         .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
         .memoryLimitMiB(1024)
         .linuxParameters(LinuxParameters.Builder.create(this, "LinuxParameters")
                 .initProcessEnabled(true)
                 .sharedMemorySize(1024)
                 .maxSwap(Size.mebibytes(5000))
                 .swappiness(90)
                 .build())
         .build());
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for LinuxParameters.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    LinuxParameters(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    LinuxParameters(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    LinuxParameters(software.constructs.Construct scope, String id)
    Constructs a new instance of the LinuxParameters class.
     
    LinuxParameters(software.constructs.Construct scope, String id, LinuxParametersProps props)
    Constructs a new instance of the LinuxParameters class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCapabilities(@NotNull Capability... cap)
    Adds one or more Linux capabilities to the Docker configuration of a container.
    void
    addDevices(@NotNull Device... device)
    Adds one or more host devices to a container.
    void
    addTmpfs(@NotNull Tmpfs... tmpfs)
    Specifies the container path, mount options, and size (in MiB) of the tmpfs mount for a container.
    void
    dropCapabilities(@NotNull Capability... cap)
    Removes one or more Linux capabilities to the Docker configuration of a container.
    Renders the Linux parameters to a CloudFormation object.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • LinuxParameters

      protected LinuxParameters(software.amazon.jsii.JsiiObjectRef objRef)
    • LinuxParameters

      protected LinuxParameters(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • LinuxParameters

      @Stability(Stable) public LinuxParameters(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable LinuxParametersProps props)
      Constructs a new instance of the LinuxParameters class.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • LinuxParameters

      @Stability(Stable) public LinuxParameters(@NotNull software.constructs.Construct scope, @NotNull String id)
      Constructs a new instance of the LinuxParameters class.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • addCapabilities

      @Stability(Stable) public void addCapabilities(@NotNull @NotNull Capability... cap)
      Adds one or more Linux capabilities to the Docker configuration of a container.

      Tasks launched on Fargate only support adding the 'SYS_PTRACE' kernel capability.

      Parameters:
      cap - This parameter is required.
    • addDevices

      @Stability(Stable) public void addDevices(@NotNull @NotNull Device... device)
      Adds one or more host devices to a container.

      Parameters:
      device - This parameter is required.
    • addTmpfs

      @Stability(Stable) public void addTmpfs(@NotNull @NotNull Tmpfs... tmpfs)
      Specifies the container path, mount options, and size (in MiB) of the tmpfs mount for a container.

      Only works with EC2 launch type.

      Parameters:
      tmpfs - This parameter is required.
    • dropCapabilities

      @Stability(Stable) public void dropCapabilities(@NotNull @NotNull Capability... cap)
      Removes one or more Linux capabilities to the Docker configuration of a container.

      Parameters:
      cap - This parameter is required.
    • renderLinuxParameters

      @Stability(Stable) @NotNull public CfnTaskDefinition.LinuxParametersProperty renderLinuxParameters()
      Renders the Linux parameters to a CloudFormation object.