# AzureSubnetResource Properties

- Package: [Aspire.Hosting.Azure.Network](/reference/api/csharp/aspire.hosting.azure.network.md)
- Type: [AzureSubnetResource](/reference/api/csharp/aspire.hosting.azure.network/azuresubnetresource.md)
- Kind: `Properties`
- Members: `5`

Represents an Azure Subnet resource.

## AddressPrefix

- Name: `AddressPrefix`
- Modifiers: `nullable` `get`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureSubnetResource.cs#L65)

Gets the address prefix for the subnet (e.g., "10.0.1.0/24"), or `null` if the address prefix is provided via a `ApplicationModel.ParameterResource`.

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

## AddressPrefixParameter

- Name: `AddressPrefixParameter`
- Modifiers: `nullable` `get`
- Returns: `ParameterResource?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureSubnetResource.cs#L70)

Gets the parameter resource containing the address prefix for the subnet, or `null` if the address prefix is provided as a literal string.

```csharp
public ParameterResource? AddressPrefixParameter { get; }
```

## Id

- Name: `Id`
- Modifiers: `get`
- Returns: `BicepOutputReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureSubnetResource.cs#L75)

Gets the subnet Id output reference.

```csharp
public BicepOutputReference Id { get; }
```

## Parent

- Name: `Parent`
- Modifiers: `get`
- Returns: [AzureVirtualNetworkResource](/reference/api/csharp/aspire.hosting.azure.network/azurevirtualnetworkresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureSubnetResource.cs#L80)

Gets the parent Azure Virtual Network resource.

```csharp
public AzureVirtualNetworkResource Parent { get; }
```

## SubnetName

- Name: `SubnetName`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureSubnetResource.cs#L60)

Gets the subnet name.

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