# AzureApplicationInsightsResource

- Kind: `class`
- Package: [Aspire.Hosting.Azure.ApplicationInsights](/reference/api/csharp/aspire.hosting.azure.applicationinsights.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.ApplicationInsights/AzureApplicationInsightsResource.cs)
- Inherits: `AzureProvisioningResource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IValueProvider`, `IValueWithReferences`

A resource that represents an Azure Application Insights resource.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class AzureApplicationInsightsResource
    : Aspire.Hosting.Azure.AzureProvisioningResource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences
{
    // ...
}
```

## Constructors

- [AzureApplicationInsightsResource(string, Action<AzureResourceInfrastructure>)](/reference/api/csharp/aspire.hosting.azure.applicationinsights/azureapplicationinsightsresource/constructors.md#constructor-string-action-azureresourceinfrastructure) -- A resource that represents an Azure Application Insights resource.

## Properties

- [ConnectionString](/reference/api/csharp/aspire.hosting.azure.applicationinsights/azureapplicationinsightsresource/properties.md#connectionstring) : `BicepOutputReference` `get` -- Gets the "appInsightsConnectionString" output reference for the Azure Application Insights resource.
- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.azure.applicationinsights/azureapplicationinsightsresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string template for the manifest for the Azure Application Insights resource.
- [NameOutputReference](/reference/api/csharp/aspire.hosting.azure.applicationinsights/azureapplicationinsightsresource/properties.md#nameoutputreference) : `BicepOutputReference` `get` -- Gets the "name" output reference for the resource.

## Methods

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