# AzureAppServiceEnvironmentResource

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

## Definition

```typescript
interface AzureAppServiceEnvironmentResource
  extends IAzureResource,
    IComputeEnvironmentResource,
    IContainerRegistry,
    IResource,
    IResourceWithParameters,
    IAzureComputeEnvironmentResource,
    IAzureContainerRegistry {
  withAcrPullIdentity(identityBuilder: AzureUserAssignedIdentityResource): AzureAppServiceEnvironmentResource;
  withAzureApplicationInsights(applicationInsights?: AzureApplicationInsightsResource): AzureAppServiceEnvironmentResource;
  withDashboard(enable?: boolean): AzureAppServiceEnvironmentResource;
  withDeploymentSlot(deploymentSlot: ParameterResource): AzureAppServiceEnvironmentResource;
  withHttpsUpgrade(upgrade?: boolean): AzureAppServiceEnvironmentResource;
}
```

## Methods

- [withAcrPullIdentity](/reference/api/typescript/aspire.hosting.azure.appservice/azureappserviceenvironmentresource/withacrpullidentity.md) -- `method` -- Configures the Azure App Service environment to use the supplied `AzureUserAssignedIdentityResource` as the managed identity that App Service apps use to pull images from the configured container registry (the `AcrPull` identity), instead of having Aspire create a new identity and a new `AcrPull` role assignment.
    ```typescript
  withAcrPullIdentity(identityBuilder: AzureUserAssignedIdentityResource): AzureAppServiceEnvironmentResource
  ```
- [withAzureApplicationInsights](/reference/api/typescript/aspire.hosting.azure.appservice/azureappserviceenvironmentresource/withazureapplicationinsights.md) -- `method` -- Enables Azure Application Insights for the Azure App Service environment
    ```typescript
  withAzureApplicationInsights(applicationInsights?: AzureApplicationInsightsResource): AzureAppServiceEnvironmentResource
  ```
- [withDashboard](/reference/api/typescript/aspire.hosting.azure.appservice/azureappserviceenvironmentresource/withdashboard.md) -- `method` -- Configures whether the Aspire dashboard should be 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: ParameterResource): AzureAppServiceEnvironmentResource
  ```
- [withHttpsUpgrade](/reference/api/typescript/aspire.hosting.azure.appservice/azureappserviceenvironmentresource/withhttpsupgrade.md) -- `method` -- Configures whether HTTP endpoints should be automatically upgraded to HTTPS for the Azure App Service environment. By default, HTTP endpoints are upgraded to HTTPS for security and WebSocket compatibility.
    ```typescript
  withHttpsUpgrade(upgrade?: boolean): AzureAppServiceEnvironmentResource
  ```
