# KindPortMappingModel Properties

- Package: [CommunityToolkit.Aspire.Hosting.Kind](/reference/api/csharp/communitytoolkit.aspire.hosting.kind.md)
- Type: [KindPortMappingModel](/reference/api/csharp/communitytoolkit.aspire.hosting.kind/kindportmappingmodel.md)
- Kind: `Properties`
- Members: `4`

Represents a host port mapping into a Kind node container.

<a id="containerport"></a>

## ContainerPort

- Name: `ContainerPort`
- Modifiers: `nullable` `get; set`
- Returns: `int?`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.Kind/KindConfigModels.cs)

Gets or sets the port within the container.

```csharp
public int? ContainerPort { get; set; }
```

<a id="hostport"></a>

## HostPort

- Name: `HostPort`
- Modifiers: `nullable` `get; set`
- Returns: `int?`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.Kind/KindConfigModels.cs)

Gets or sets the port on the host. When `null`, a random port is selected.

```csharp
public int? HostPort { get; set; }
```

<a id="listenaddress"></a>

## ListenAddress

- Name: `ListenAddress`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.Kind/KindConfigModels.cs)

Gets or sets the address to listen on. When `null`, Kind uses its default.

```csharp
public string? ListenAddress { get; set; }
```

<a id="protocol"></a>

## Protocol

- Name: `Protocol`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.Kind/KindConfigModels.cs)

Gets or sets the protocol (e.g., "TCP", "UDP", or "SCTP"). When `null`, defaults to TCP.

```csharp
public string? Protocol { get; set; }
```
