# AllocatedEndpoint Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [AllocatedEndpoint](/reference/api/csharp/aspire.hosting/allocatedendpoint.md)
- Kind: `Properties`
- Members: `9`

Represents an endpoint allocated for a service instance.

## Address

- Name: `Address`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs)

The address of the endpoint

```csharp
public string Address { get; }
```

## BindingMode

- Name: `BindingMode`
- Modifiers: `get`
- Returns: [EndpointBindingMode](/reference/api/csharp/aspire.hosting/endpointbindingmode.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs)

The binding mode of the endpoint, indicating whether it is a single address endpoint or is bound to all IPv4 or IPv6 addresses (or both).

```csharp
public EndpointBindingMode BindingMode { get; }
```

## Endpoint

- Name: `Endpoint`
- Modifiers: `get`
- Returns: [EndpointAnnotation](/reference/api/csharp/aspire.hosting/endpointannotation.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs#L101)

Gets the endpoint which this allocation is associated with.

```csharp
public EndpointAnnotation Endpoint { get; }
```

## EndPointString

- Name: `EndPointString`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs#L127)

Endpoint in string representation formatted as `"Address:Port"`.

```csharp
public string EndPointString { get; }
```

## NetworkID

- Name: `NetworkID`
- Modifiers: `get`
- Returns: [NetworkIdentifier](/reference/api/csharp/aspire.hosting/networkidentifier.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs)

Gets the network identifier for the network associated with the [AllocatedEndpoint](/reference/api/csharp/aspire.hosting/allocatedendpoint.md) instance.

```csharp
public NetworkIdentifier NetworkID { get; }
```

## Port

- Name: `Port`
- Modifiers: `get`
- Returns: `int`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs)

The port used by the endpoint

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

## TargetPortExpression

- Name: `TargetPortExpression`
- Modifiers: `nullable` `get`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs#L137)

A string representing how to retrieve the target port of the [AllocatedEndpoint](/reference/api/csharp/aspire.hosting/allocatedendpoint.md) instance.

```csharp
public string? TargetPortExpression { get; }
```

## UriScheme

- Name: `UriScheme`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs#L122)

For URI-addressed services, contains the scheme part of the address.

```csharp
public string UriScheme { get; }
```

## UriString

- Name: `UriString`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/AllocatedEndpoint.cs#L132)

URI in string representation.

```csharp
public string UriString { get; }
```
