# DelegatedSubnetAnnotation

- Kind: `class`
- Package: [Aspire.Hosting.Azure](/reference/api/csharp/aspire.hosting.azure.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure/DelegatedSubnetAnnotation.cs)
- Implements: `IResourceAnnotation`

Annotation that stores a reference to a subnet for an Azure resource that implements [IAzureDelegatedSubnetResource](/reference/api/csharp/aspire.hosting.azure/iazuredelegatedsubnetresource.md).

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public sealed class DelegatedSubnetAnnotation
    : Aspire.Hosting.ApplicationModel.IResourceAnnotation
{
    // ...
}
```

## Constructors

- [DelegatedSubnetAnnotation(ReferenceExpression)](/reference/api/csharp/aspire.hosting.azure/delegatedsubnetannotation/constructors.md#constructor-referenceexpression) -- Annotation that stores a reference to a subnet for an Azure resource that implements [IAzureDelegatedSubnetResource](/reference/api/csharp/aspire.hosting.azure/iazuredelegatedsubnetresource.md).

## Properties

- [SubnetId](/reference/api/csharp/aspire.hosting.azure/delegatedsubnetannotation/properties.md#subnetid) : `ReferenceExpression` `get` -- Gets the subnet ID reference expression.
