# AzureCognitiveServicesProjectResource Properties

- Package: [Aspire.Hosting.Foundry](/reference/api/csharp/aspire.hosting.foundry.md)
- Type: [AzureCognitiveServicesProjectResource](/reference/api/csharp/aspire.hosting.foundry/azurecognitiveservicesprojectresource.md)
- Kind: `Properties`
- Members: `9`

The Microsoft Foundry project resource that can be used for Microsoft Foundry AI agents. This also functions as an Aspire compute environment resource for deployment.

## AppInsights

- Name: `AppInsights`
- Modifiers: `nullable` `get; set`
- Returns: `AzureApplicationInsightsResource?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/Project/ProjectResource.cs)

The Application Insights resource associated with this project, if any. This will be used as the destination for server-side telemetry from hosted agents and optionally for client-side telemetry if the application decides to use it.

```csharp
public AzureApplicationInsightsResource? AppInsights { get; set; }
```

## CapabilityHostConfiguration

- Name: `CapabilityHostConfiguration`
- Modifiers: `nullable` `get; set`
- Returns: [CapabilityHostConfiguration?](/reference/api/csharp/aspire.hosting.foundry/capabilityhostconfiguration.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/Project/ProjectResource.cs)

The capability host resources associated with this project, if any

```csharp
public CapabilityHostConfiguration? CapabilityHostConfiguration { get; set; }
```

## ConnectionStringExpression

- Name: `ConnectionStringExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/Project/ProjectResource.cs#L114)

Gets the .NET-style connection string for the project API endpoint.

```csharp
public ReferenceExpression ConnectionStringExpression { get; }
```

## ContainerRegistry

- Name: `ContainerRegistry`
- Modifiers: `nullable` `get`
- Returns: `AzureContainerRegistryResource?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/Project/ProjectResource.cs#L161-L175)

Gets the Azure Container Registry resource used by this project.

```csharp
public AzureContainerRegistryResource? ContainerRegistry { get; }
```

## Endpoint

- Name: `Endpoint`
- Modifiers: `get`
- Returns: `BicepOutputReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/Project/ProjectResource.cs#L132)

Gets the "endpoint" output reference from the Microsoft Foundry project resource. This will be used to instantiate the AI project clients. Will be of the format https:/{accountName}.services.ai.azure.com/api/projects/{projectName}?api-version={apiVersion}

```csharp
public BicepOutputReference Endpoint { get; }
```

## Id

- Name: `Id`
- Modifiers: `get`
- Returns: `BicepOutputReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/Project/ProjectResource.cs#L109)

Azure Resource ID output reference.

```csharp
public BicepOutputReference Id { get; }
```

## KeyVaultConn

- Name: `KeyVaultConn`
- Modifiers: `nullable` `get; set`
- Returns: [AzureCognitiveServicesProjectConnectionResource?](/reference/api/csharp/aspire.hosting.foundry/azurecognitiveservicesprojectconnectionresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/Project/ProjectResource.cs)

Connection to the user-assigned key vault, if any.

```csharp
public AzureCognitiveServicesProjectConnectionResource? KeyVaultConn { get; set; }
```

## PrincipalId

- Name: `PrincipalId`
- Modifiers: `get`
- Returns: `BicepOutputReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/Project/ProjectResource.cs#L145)

Gets the managed identity principal ID, whether system-assigned or user-assigned.

```csharp
public BicepOutputReference PrincipalId { get; }
```

## UriExpression

- Name: `UriExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/Project/ProjectResource.cs#L123)

Gets the Microsoft Foundry project endpoint as a ReferenceExpression that can be used in environment variables or connection strings. This will be used to instantiate the AI project clients. Will be of the format https:/{accountName}.services.ai.azure.com/api/projects/{projectName}?api-version={apiVersion}

```csharp
public ReferenceExpression UriExpression { get; }
```
