# AzurePrivateEndpointResource

- Kind: `class`
- Package: [Aspire.Hosting.Azure.Network](/reference/api/csharp/aspire.hosting.azure.network.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Network/AzurePrivateEndpointResource.cs)
- Inherits: `AzureProvisioningResource`

Represents an Azure Private Endpoint resource.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class AzurePrivateEndpointResource
    : Aspire.Hosting.Azure.AzureProvisioningResource
{
    // ...
}
```

## Constructors

- [AzurePrivateEndpointResource(string, AzureSubnetResource, IAzurePrivateEndpointTarget, Action<AzureResourceInfrastructure>)](/reference/api/csharp/aspire.hosting.azure.network/azureprivateendpointresource/constructors.md#constructor-string-azuresubnetresource-iazureprivateendpointtarget-action-azureresourceinfrastructure) -- Represents an Azure Private Endpoint resource.

## Properties

- [Id](/reference/api/csharp/aspire.hosting.azure.network/azureprivateendpointresource/properties.md#id) : `BicepOutputReference` `get` -- Gets the "id" output reference from the Azure Private Endpoint resource.
- [NameOutputReference](/reference/api/csharp/aspire.hosting.azure.network/azureprivateendpointresource/properties.md#nameoutputreference) : `BicepOutputReference` `get` -- Gets the "name" output reference for the resource.
- [Subnet](/reference/api/csharp/aspire.hosting.azure.network/azureprivateendpointresource/properties.md#subnet) : [AzureSubnetResource](/reference/api/csharp/aspire.hosting.azure.network/azuresubnetresource.md) `get` -- Gets the subnet where the private endpoint will be created.
- [Target](/reference/api/csharp/aspire.hosting.azure.network/azureprivateendpointresource/properties.md#target) : `IAzurePrivateEndpointTarget` `get` -- Gets the target Azure resource to connect via private link.

## Methods

- [AddAsExistingResource(AzureResourceInfrastructure)](/reference/api/csharp/aspire.hosting.azure.network/azureprivateendpointresource/methods.md#addasexistingresource-azureresourceinfrastructure) : `ProvisionableResource`
