# withDelegatedSubnet

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

Configures the resource to use the specified subnet with appropriate service 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)
