# KindPortMappingModel

- Kind: `class`
- Package: [CommunityToolkit.Aspire.Hosting.Kind](/reference/api/csharp/communitytoolkit.aspire.hosting.kind.md)
- Version: `13.4.1-beta.706`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.Kind/KindConfigModels.cs)

Represents a host port mapping into a Kind node container.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed class KindPortMappingModel
{
    // ...
}
```

## Constructors

- [KindPortMappingModel](/reference/api/csharp/communitytoolkit.aspire.hosting.kind/kindportmappingmodel/constructors.md#constructor)

## Properties

- [ContainerPort](/reference/api/csharp/communitytoolkit.aspire.hosting.kind/kindportmappingmodel/properties.md#containerport) : `int?` `get; set` -- Gets or sets the port within the container.
- [HostPort](/reference/api/csharp/communitytoolkit.aspire.hosting.kind/kindportmappingmodel/properties.md#hostport) : `int?` `get; set` -- Gets or sets the port on the host. When `null`, a random port is selected.
- [ListenAddress](/reference/api/csharp/communitytoolkit.aspire.hosting.kind/kindportmappingmodel/properties.md#listenaddress) : `string?` `get; set` -- Gets or sets the address to listen on. When `null`, Kind uses its default.
- [Protocol](/reference/api/csharp/communitytoolkit.aspire.hosting.kind/kindportmappingmodel/properties.md#protocol) : `string?` `get; set` -- Gets or sets the protocol (e.g., "TCP", "UDP", or "SCTP"). When `null`, defaults to TCP.
