# addPrivateEndpoint

- 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)

Adds an Azure Private Endpoint resource to the subnet.

## Definition

```typescript
interface AzureSubnetResource {
  // ... omitted for brevity
  addPrivateEndpoint(target: IAzurePrivateEndpointTarget): AzurePrivateEndpointResource
}
```

## Parameters

- `target` (`IAzurePrivateEndpointTarget`)

## Returns

[AzurePrivateEndpointResource](/reference/api/typescript/aspire.hosting.azure.network/azureprivateendpointresource.md) `builder`

## Applies to

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