# LifecycleHandlerV1 Properties

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [LifecycleHandlerV1](/reference/api/csharp/aspire.hosting.kubernetes/lifecyclehandlerv1.md)
- Kind: `Properties`
- Members: `4`

Represents a handler for Kubernetes lifecycle events.

## Exec

- Name: `Exec`
- Modifiers: `get; set`
- Returns: [ExecActionV1](/reference/api/csharp/aspire.hosting.kubernetes/execactionv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/LifecycleHandlerV1.cs)

Represents an action that executes a command within a container.

```csharp
public ExecActionV1 Exec { get; set; }
```

## Remarks

This property defines the execution of a command line inside a container. It is typically used in Kubernetes lifecycle hooks or probes for custom actions such as health checks or running scripts.

## HttpGet

- Name: `HttpGet`
- Modifiers: `get; set`
- Returns: [HttpGetActionV1](/reference/api/csharp/aspire.hosting.kubernetes/httpgetactionv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/LifecycleHandlerV1.cs)

Represents the HTTP GET action associated with a lifecycle handler in Kubernetes resources.

```csharp
public HttpGetActionV1 HttpGet { get; set; }
```

## Remarks

The action defines an HTTP GET request that is typically utilized in scenarios such as health checks or readiness probes. It supports configuration of parameters including the HTTP scheme, target path, host, port, and optional HTTP headers.

## Sleep

- Name: `Sleep`
- Modifiers: `get; set`
- Returns: [SleepActionV1](/reference/api/csharp/aspire.hosting.kubernetes/sleepactionv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/LifecycleHandlerV1.cs)

Gets or sets a sleep action configuration for a lifecycle handler.

```csharp
public SleepActionV1 Sleep { get; set; }
```

## Remarks

Sleep specifies a delay for a defined duration in seconds. This is commonly used in Kubernetes lifecycle management to introduce a delay before proceeding to the next operation.

## TcpSocket

- Name: `TcpSocket`
- Modifiers: `get; set`
- Returns: [TcpSocketActionV1](/reference/api/csharp/aspire.hosting.kubernetes/tcpsocketactionv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/LifecycleHandlerV1.cs)

Gets or sets the TcpSocketActionV1 property.

```csharp
public TcpSocketActionV1 TcpSocket { get; set; }
```

## Remarks

TcpSocket represents an action performed on a specified TCP socket. This property is used in the context of lifecycle hooks or probes within Kubernetes resources to establish a connection on the given host and port.
