# ContainerPortConstruct

- Kind: `class`
- Package: [Aspire.Hosting.Radius](/reference/api/csharp/aspire.hosting.radius.md)
- Version: `13.5.3-preview.1.26425.3`
- Namespace: `Aspire.Hosting.Radius.Publishing.Constructs`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/b5f143315ffb6968ea939a9978797a5b20e4c688/src/Aspire.Hosting.Radius/Publishing/Constructs/ContainerPortConstruct.cs)
- Inherits: `ProvisionableConstruct`

Represents a single port entry in a container's `ports` block.

## Definition

```csharp
namespace Aspire.Hosting.Radius.Publishing.Constructs;

public sealed class ContainerPortConstruct
    : Azure.Provisioning.Primitives.ProvisionableConstruct
{
    // ...
}
```

## Remarks

The Radius container schema models `ports` as a map keyed by the port name, where each entry exposes a `containerPort` (the port the application listens on inside the container) and an optional `protocol` ( `TCP` or `UDP`). See: https://github.com/radius-project/radius/blob/main/eng/design-notes/extensibility/2025-08-container-resource-type.md

## Constructors

- [ContainerPortConstruct](/reference/api/csharp/aspire.hosting.radius/containerportconstruct/constructors.md#constructor)

## Properties

- [ContainerPort](/reference/api/csharp/aspire.hosting.radius/containerportconstruct/properties.md#containerport) : `BicepValue<int>` `get; set` -- The port the application listens on inside the container.
- [Protocol](/reference/api/csharp/aspire.hosting.radius/containerportconstruct/properties.md#protocol) : `BicepValue<string>` `get; set` -- The transport protocol ( `TCP` or `UDP`).
