# ContainerLifetimeAnnotation Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ContainerLifetimeAnnotation](/reference/api/csharp/aspire.hosting/containerlifetimeannotation.md)
- Kind: `Properties`
- Members: `1`

Annotation that controls the lifetime of a container resource.

## Lifetime

- Name: `Lifetime`
- Modifiers: `get; set`
- Returns: [ContainerLifetime](/reference/api/csharp/aspire.hosting/containerlifetime.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ApplicationModel/ContainerLifetimeAnnotation.cs)

Gets or sets the lifetime type for the container resource.

```csharp
public ContainerLifetime Lifetime { get; set; }
```
