class LinuxParameters (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ECS.LinuxParameters |
Java | software.amazon.awscdk.services.ecs.LinuxParameters |
Python | aws_cdk.aws_ecs.LinuxParameters |
TypeScript (source) | @aws-cdk/aws-ecs » LinuxParameters |
Implements
IConstruct
, 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 ecs from '@aws-cdk/aws-ecs';
const linuxParameters = new ecs.LinuxParameters(this, 'MyLinuxParameters', /* all optional props */ {
initProcessEnabled: false,
sharedMemorySize: 123,
});
Initializer
new LinuxParameters(scope: Construct, id: string, props?: LinuxParametersProps)
Parameters
- scope
Construct
- id
string
- props
Linux
Parameters Props
Constructs a new instance of the LinuxParameters class.
Construct Props
Name | Type | Description |
---|---|---|
init | boolean | Specifies whether to run an init process inside the container that forwards signals and reaps processes. |
shared | number | The value for the size (in MiB) of the /dev/shm volume. |
initProcessEnabled?
Type:
boolean
(optional, default: false)
Specifies whether to run an init process inside the container that forwards signals and reaps processes.
sharedMemorySize?
Type:
number
(optional, default: No shared memory.)
The value for the size (in MiB) of the /dev/shm volume.
Properties
Name | Type | Description |
---|---|---|
node | Construct | The construct tree node associated with this construct. |
node
Type:
Construct
The construct tree node associated with this construct.
Methods
Name | Description |
---|---|
add | Adds one or more Linux capabilities to the Docker configuration of a container. |
add | Adds one or more host devices to a container. |
add | Specifies the container path, mount options, and size (in MiB) of the tmpfs mount for a container. |
drop | Removes one or more Linux capabilities to the Docker configuration of a container. |
render | Renders the Linux parameters to a CloudFormation object. |
to | Returns a string representation of this construct. |
Capabilities(...cap)
addpublic addCapabilities(...cap: Capability[]): void
Parameters
- cap
Capability
Adds one or more Linux capabilities to the Docker configuration of a container.
Only works with EC2 launch type.
Devices(...device)
addpublic addDevices(...device: Device[]): void
Parameters
- device
Device
Adds one or more host devices to a container.
Tmpfs(...tmpfs)
addpublic 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.
Capabilities(...cap)
droppublic dropCapabilities(...cap: Capability[]): void
Parameters
- cap
Capability
Removes one or more Linux capabilities to the Docker configuration of a container.
Only works with EC2 launch type.
LinuxParameters()
renderpublic renderLinuxParameters(): LinuxParametersProperty
Returns
Renders the Linux parameters to a CloudFormation object.
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.