@aws-cdk_aws-batch-alpha.LinuxParameters

class LinuxParameters (construct) ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Batch.Alpha.LinuxParameters
Gogithub.com/aws/aws-cdk-go/awscdkbatchalpha/v2#LinuxParameters
Javasoftware.amazon.awscdk.services.batch.alpha.LinuxParameters
Pythonaws_cdk.aws_batch_alpha.LinuxParameters
TypeScript (source)@aws-cdk/aws-batch-alpha ยป LinuxParameters

Implements IConstruct, IDependable

Linux-specific options that are applied to the container.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as batch_alpha from '@aws-cdk/aws-batch-alpha';
import * as cdk from 'aws-cdk-lib';

declare const size: cdk.Size;
const linuxParameters = new batch_alpha.LinuxParameters(this, 'MyLinuxParameters', /* all optional props */ {
  initProcessEnabled: false,
  maxSwap: size,
  sharedMemorySize: size,
  swappiness: 123,
});

Initializer

new LinuxParameters(scope: Construct, id: string, props?: LinuxParametersProps)

Parameters

  • scope Construct
  • id string
  • props LinuxParametersProps

Constructs a new instance of the LinuxParameters class.

Construct Props

NameTypeDescription
initProcessEnabled?๐Ÿ”นbooleanSpecifies whether to run an init process inside the container that forwards signals and reaps processes.
maxSwap?๐Ÿ”นSizeThe total amount of swap memory a container can use.
sharedMemorySize?๐Ÿ”นSizeThe value for the size of the /dev/shm volume.
swappiness?๐Ÿ”นnumberThis allows you to tune a container's memory swappiness behavior.

initProcessEnabled?๐Ÿ”น

Type: boolean (optional, default: false)

Specifies whether to run an init process inside the container that forwards signals and reaps processes.


maxSwap?๐Ÿ”น

Type: Size (optional, default: No swap.)

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.


sharedMemorySize?๐Ÿ”น

Type: Size (optional, default: No shared memory.)

The value for the size of the /dev/shm volume.


swappiness?๐Ÿ”น

Type: number (optional, default: 60)

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.

Properties

NameTypeDescription
devices๐Ÿ”นDevice[]Device mounts.
node๐Ÿ”นNodeThe tree node.
tmpfs๐Ÿ”นTmpfs[]TmpFs mounts.
initProcessEnabled?๐Ÿ”นbooleanWhether the init process is enabled.
maxSwap?๐Ÿ”นSizeThe max swap memory.
sharedMemorySize?๐Ÿ”นSizeThe shared memory size (in MiB).
swappiness?๐Ÿ”นnumberThe swappiness behavior.

devices๐Ÿ”น

Type: Device[]

Device mounts.


node๐Ÿ”น

Type: Node

The tree node.


tmpfs๐Ÿ”น

Type: Tmpfs[]

TmpFs mounts.


initProcessEnabled?๐Ÿ”น

Type: boolean (optional)

Whether the init process is enabled.


maxSwap?๐Ÿ”น

Type: Size (optional)

The max swap memory.


sharedMemorySize?๐Ÿ”น

Type: Size (optional)

The shared memory size (in MiB).

Not valid for Fargate launch type


swappiness?๐Ÿ”น

Type: number (optional)

The swappiness behavior.

Methods

NameDescription
addDevices(...device)๐Ÿ”นAdds one or more host devices to a container.
addTmpfs(...tmpfs)๐Ÿ”นSpecifies the container path, mount options, and size (in MiB) of the tmpfs mount for a container.
renderLinuxParameters()๐Ÿ”นRenders the Linux parameters to the Batch version of this resource, which does not have 'capabilities' and requires tmpfs.containerPath to be defined.
toString()๐Ÿ”นReturns a string representation of this construct.

addDevices(...device)๐Ÿ”น

public addDevices(...device: Device[]): void

Parameters

  • device Device

Adds one or more host devices to a container.


addTmpfs(...tmpfs)๐Ÿ”น

public addTmpfs(...tmpfs: Tmpfs[]): void

Parameters

  • 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.


renderLinuxParameters()๐Ÿ”น

public renderLinuxParameters(): LinuxParametersProperty

Returns

  • LinuxParametersProperty

Renders the Linux parameters to the Batch version of this resource, which does not have 'capabilities' and requires tmpfs.containerPath to be defined.


toString()๐Ÿ”น

public toString(): string

Returns

  • string

Returns a string representation of this construct.