# GatewayListenerV1 Properties

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

Represents a listener on a Gateway. A listener defines how the Gateway receives traffic on a specific port and protocol.

## AllowedRoutes

- Name: `AllowedRoutes`
- Modifiers: `nullable` `get; set`
- Returns: [GatewayAllowedRoutesV1?](/reference/api/csharp/aspire.hosting.kubernetes/gatewayallowedroutesv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/GatewayV1.cs)

Gets or sets the allowed routes configuration for this listener.

```csharp
public GatewayAllowedRoutesV1? AllowedRoutes { get; set; }
```

## Hostname

- Name: `Hostname`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/GatewayV1.cs)

Gets or sets the optional hostname for this listener. When set, only requests matching this hostname are handled by this listener.

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

## Name

- Name: `Name`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/GatewayV1.cs)

Gets or sets the name of this listener. Must be unique within the Gateway.

```csharp
public string Name { get; set; }
```

## Port

- Name: `Port`
- Modifiers: `get; set`
- Returns: `int`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/GatewayV1.cs)

Gets or sets the network port for this listener.

```csharp
public int Port { get; set; }
```

## Protocol

- Name: `Protocol`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/GatewayV1.cs)

Gets or sets the protocol for this listener (e.g., `"HTTP"`, `"HTTPS"`, `"TLS"`).

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

## Tls

- Name: `Tls`
- Modifiers: `nullable` `get; set`
- Returns: [GatewayTlsConfigV1?](/reference/api/csharp/aspire.hosting.kubernetes/gatewaytlsconfigv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/GatewayV1.cs)

Gets or sets the TLS configuration for this listener. Required when protocol is HTTPS or TLS.

```csharp
public GatewayTlsConfigV1? Tls { get; set; }
```
