# withDelegatedSubnet

- Module: [Aspire.Hosting.Azure.Network](/reference/api/typescript/aspire.hosting.azure.network.md)
- Version: `13.3.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

Associates a delegated Azure subnet resource with an Azure resource that supports subnet delegation.

## Definition

```typescript
interface IAzureDelegatedSubnetResource {
  // ... omitted for brevity
  withDelegatedSubnet(subnet: AzureSubnetResource): IAzureDelegatedSubnetResource
}
```

## Parameters

- `subnet` ([AzureSubnetResource](/reference/api/typescript/aspire.hosting.azure.network/azuresubnetresource.md))

## Returns

`IAzureDelegatedSubnetResource` `builder`

## Applies to

- [IAzureDelegatedSubnetResource](/reference/api/typescript/aspire.hosting.azure.network/iazuredelegatedsubnetresource.md)
