# withAzureLogAnalyticsWorkspace

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

Configures the container app environment resource to use the specified Log Analytics Workspace.

## Definition

```typescript
interface AzureContainerAppEnvironmentResource {
  // ... omitted for brevity
  withAzureLogAnalyticsWorkspace(workspaceBuilder: AzureLogAnalyticsWorkspaceResource): AzureContainerAppEnvironmentResource
}
```

## Parameters

- `workspaceBuilder` (`AzureLogAnalyticsWorkspaceResource`)

## Returns

[AzureContainerAppEnvironmentResource](/reference/api/typescript/aspire.hosting.azure.appcontainers/azurecontainerappenvironmentresource.md) `builder`

## Applies to

- [AzureContainerAppEnvironmentResource](/reference/api/typescript/aspire.hosting.azure.appcontainers/azurecontainerappenvironmentresource.md)
