UlimitName Enum
Type of resource to set a limit on.
| Source | aws-ecs/lib/container-definition.ts |
|---|
Example
ts
const taskDefinition = new ecs.Ec2TaskDefinition(this, 'TaskDef');
taskDefinition.addContainer('TheContainer', {
image: ecs.ContainerImage.fromRegistry('example-image'),
ulimits: [{
hardLimit: 128,
name: ecs.UlimitName.RSS,
softLimit: 128,
}],
});
python
task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
task_definition.add_container("TheContainer",
image=ecs.ContainerImage.from_registry("example-image"),
ulimits=[ecs.Ulimit(
hard_limit=128,
name=ecs.UlimitName.RSS,
soft_limit=128
)]
)
java
Ec2TaskDefinition taskDefinition = new Ec2TaskDefinition(this, "TaskDef");
taskDefinition.addContainer("TheContainer", ContainerDefinitionOptions.builder()
.image(ContainerImage.fromRegistry("example-image"))
.ulimits(List.of(Ulimit.builder()
.hardLimit(128)
.name(UlimitName.RSS)
.softLimit(128)
.build()))
.build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
var taskDefinition = new Ec2TaskDefinition(this, "TaskDef");
taskDefinition.AddContainer("TheContainer", new ContainerDefinitionOptions {
Image = ContainerImage.FromRegistry("example-image"),
Ulimits = new [] { new Ulimit {
HardLimit = 128,
Name = UlimitName.RSS,
SoftLimit = 128
} }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{
Image: ecs.ContainerImage_FromRegistry(jsii.String("example-image")),
Ulimits: []Ulimit{
&Ulimit{
HardLimit: jsii.Number(128),
Name: ecs.UlimitName_RSS,
SoftLimit: jsii.Number(128),
},
},
})
Members
| Member | Description |
|---|---|
CORE | |
CPU | |
DATA | |
FSIZE | |
LOCKS | |
MEMLOCK | |
MSGQUEUE | |
NICE | |
NOFILE | |
NPROC | |
RSS | |
RTPRIO | |
RTTIME | |
SIGPENDING | |
STACK |
Referenced by
Ulimit.namenamenameNameName