# ContainerNetworkAliasAnnotation Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ContainerNetworkAliasAnnotation](/reference/api/csharp/aspire.hosting/containernetworkaliasannotation.md)
- Kind: `Properties`
- Members: `2`

Represents an annotation for a custom network alias for a container resource.

## Alias

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

Gets the network alias for the container.

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

## Network

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

Gets or sets the network identifier for the network to which the alias applies.

```csharp
public NetworkIdentifier Network { get; set; }
```

## Remarks

If not specified, defaults to the default Aspire container network.
