# AzureSubnetServiceDelegationAnnotation Constructors

- Package: [Aspire.Hosting.Azure.Network](/reference/api/csharp/aspire.hosting.azure.network.md)
- Type: [AzureSubnetServiceDelegationAnnotation](/reference/api/csharp/aspire.hosting.azure.network/azuresubnetservicedelegationannotation.md)
- Kind: `Constructors`
- Members: `1`

Annotation to specify a service delegation for an Azure Subnet.

## AzureSubnetServiceDelegationAnnotation(string, string)

- Name: `Constructor(string, string)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzureSubnetServiceDelegationAnnotation.cs#L13-L23)

Annotation to specify a service delegation for an Azure Subnet.

```csharp
public sealed class AzureSubnetServiceDelegationAnnotation
{
    public AzureSubnetServiceDelegationAnnotation(
        string name,
        string serviceName)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the service delegation.
- `serviceName` (`string`)
  The service name for the delegation (e.g., "Microsoft.App/environments").
