# Ulimit

Struct · Stable

The ulimit settings to pass to the container.

NOTE: Does not work for Windows containers.

Used as argument in: [ContainerDefinition.addUlimits](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ContainerDefinition.html#addulimits)

- Source: [`aws-ecs/lib/container-definition.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ecs/lib/container-definition.ts#L1149)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const ulimit: ecs.Ulimit = {
  hardLimit: 123,
  name: ecs.UlimitName.CORE,
  softLimit: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

ulimit = ecs.Ulimit(
    hard_limit=123,
    name=ecs.UlimitName.CORE,
    soft_limit=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;

Ulimit ulimit = Ulimit.builder()
        .hardLimit(123)
        .name(UlimitName.CORE)
        .softLimit(123)
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;

var ulimit = new Ulimit {
    HardLimit = 123,
    Name = UlimitName.CORE,
    SoftLimit = 123
};
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

ulimit := &Ulimit{
	HardLimit: jsii.Number(123),
	Name: awscdk.Aws_ecs.UlimitName_CORE,
	SoftLimit: jsii.Number(123),
}
```

## Properties

- `hardLimit`: number (required) — The hard limit for the ulimit type.

- `name`: [UlimitName](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.UlimitName.html) (required) — The type of the ulimit.

  For more information, see [UlimitName](https://docs.aws.amazon.com/cdk/api/latest/typescript/api/aws-ecs/ulimitname.html#aws_ecs_UlimitName).

- `softLimit`: number (required) — The soft limit for the ulimit type.
