# AzurePrivateEndpointResource Constructors

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

Represents an Azure Private Endpoint resource.

## AzurePrivateEndpointResource(string, AzureSubnetResource, IAzurePrivateEndpointTarget, Action<AzureResourceInfrastructure>)

- Name: `Constructor(string, AzureSubnetResource, IAzurePrivateEndpointTarget, Action<AzureResourceInfrastructure>)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzurePrivateEndpointResource.cs#L21-L46)

Represents an Azure Private Endpoint resource.

```csharp
public class AzurePrivateEndpointResource
{
    public AzurePrivateEndpointResource(
        string name,
        AzureSubnetResource subnet,
        IAzurePrivateEndpointTarget target,
        Action<AzureResourceInfrastructure> configureInfrastructure)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource.
- `subnet` ([AzureSubnetResource](/reference/api/csharp/aspire.hosting.azure.network/azuresubnetresource.md))
  The subnet where the private endpoint will be created.
- `target` (`IAzurePrivateEndpointTarget`)
  The target Azure resource to connect via private link.
- `configureInfrastructure` (`Action<AzureResourceInfrastructure>`)
  Callback to configure the Azure Private Endpoint resource.
