# 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/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.Network/AzureSubnetResource.cs#L64)

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/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.Network/AzureSubnetResource.cs#L69)

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/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.Network/AzureSubnetResource.cs#L74)

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/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.Network/AzureSubnetResource.cs#L79)

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/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Azure.Network/AzureSubnetResource.cs#L59)

Gets the subnet name.

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