# AzureAppServiceEnvironmentResource

- Module: [Aspire.Hosting.Azure.AppService](/reference/api/typescript/aspire.hosting.azure.appservice.md)
- Version: `13.2.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

## Definition

```typescript
interface AzureAppServiceEnvironmentResource
  extends IAzureResource,
    IComputeEnvironmentResource,
    IContainerRegistry,
    IResource,
    IResourceWithParameters,
    IAzureComputeEnvironmentResource,
    IAzureContainerRegistry {
  withAzureApplicationInsights(): AzureAppServiceEnvironmentResource;
  withAzureApplicationInsightsLocation(applicationInsightsLocation: string): AzureAppServiceEnvironmentResource;
  withAzureApplicationInsightsLocationParameter(applicationInsightsLocation: ParameterResource): AzureAppServiceEnvironmentResource;
  withAzureApplicationInsightsResource(applicationInsightsBuilder: AzureApplicationInsightsResource): AzureAppServiceEnvironmentResource;
  withDashboard(enable?: boolean): AzureAppServiceEnvironmentResource;
  withDeploymentSlot(deploymentSlot: string): AzureAppServiceEnvironmentResource;
  withDeploymentSlotParameter(deploymentSlot: ParameterResource): AzureAppServiceEnvironmentResource;
}
```

## Methods

- [withAzureApplicationInsights](/reference/api/typescript/aspire.hosting.azure.appservice/azureappserviceenvironmentresource/withazureapplicationinsights.md) -- `method` -- Enables Azure Application Insights for the Azure App Service environment
    ```typescript
  withAzureApplicationInsights(): AzureAppServiceEnvironmentResource
  ```
- [withAzureApplicationInsightsLocation](/reference/api/typescript/aspire.hosting.azure.appservice/azureappserviceenvironmentresource/withazureapplicationinsightslocation.md) -- `method` -- Enables Azure Application Insights for the Azure App Service environment with a specific location
    ```typescript
  withAzureApplicationInsightsLocation(applicationInsightsLocation: string): AzureAppServiceEnvironmentResource
  ```
- [withAzureApplicationInsightsLocationParameter](/reference/api/typescript/aspire.hosting.azure.appservice/azureappserviceenvironmentresource/withazureapplicationinsightslocationparameter.md) -- `method` -- Enables Azure Application Insights for the Azure App Service environment using a location parameter
    ```typescript
  withAzureApplicationInsightsLocationParameter(applicationInsightsLocation: ParameterResource): AzureAppServiceEnvironmentResource
  ```
- [withAzureApplicationInsightsResource](/reference/api/typescript/aspire.hosting.azure.appservice/azureappserviceenvironmentresource/withazureapplicationinsightsresource.md) -- `method` -- Enables Azure Application Insights for the Azure App Service environment using an existing Application Insights resource
    ```typescript
  withAzureApplicationInsightsResource(applicationInsightsBuilder: AzureApplicationInsightsResource): AzureAppServiceEnvironmentResource
  ```
- [withDashboard](/reference/api/typescript/aspire.hosting.azure.appservice/azureappserviceenvironmentresource/withdashboard.md) -- `method` -- Configures whether the Aspire dashboard is included in the Azure App Service environment
    ```typescript
  withDashboard(enable?: boolean): AzureAppServiceEnvironmentResource
  ```
- [withDeploymentSlot](/reference/api/typescript/aspire.hosting.azure.appservice/azureappserviceenvironmentresource/withdeploymentslot.md) -- `method` -- Configures the deployment slot for all Azure App Services in the environment
    ```typescript
  withDeploymentSlot(deploymentSlot: string): AzureAppServiceEnvironmentResource
  ```
- [withDeploymentSlotParameter](/reference/api/typescript/aspire.hosting.azure.appservice/azureappserviceenvironmentresource/withdeploymentslotparameter.md) -- `method` -- Configures the deployment slot for all Azure App Services in the environment using a parameter
    ```typescript
  withDeploymentSlotParameter(deploymentSlot: ParameterResource): AzureAppServiceEnvironmentResource
  ```
