# Aspire.Hosting.Azure.WebPubSub

- Module: `Aspire.Hosting.Azure.WebPubSub`
- Version: `17.0.0`
- Import path: `apphost/modules/aspire`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)
- Functions: `5`
- Types: `8`

## Handles

- [AzureBicepResource](/reference/api/go/aspire.hosting.azure.webpubsub/azurebicepresource.md) -- `handle` - 0 members
- [AzureEnvironmentResource](/reference/api/go/aspire.hosting.azure.webpubsub/azureenvironmentresource.md) -- `handle` - 0 members
- [AzureProvisioningResource](/reference/api/go/aspire.hosting.azure.webpubsub/azureprovisioningresource.md) -- `handle` - 0 members
- [AzureUserAssignedIdentityResource](/reference/api/go/aspire.hosting.azure.webpubsub/azureuserassignedidentityresource.md) -- `handle` - 0 members
- [AzureWebPubSubEmulatorResource](/reference/api/go/aspire.hosting.azure.webpubsub/azurewebpubsubemulatorresource.md) -- `handle` - 0 members
- [AzureWebPubSubHubResource](/reference/api/go/aspire.hosting.azure.webpubsub/azurewebpubsubhubresource.md) -- `handle` - 1 members
- [AzureWebPubSubResource](/reference/api/go/aspire.hosting.azure.webpubsub/azurewebpubsubresource.md) -- `handle` - 2 members

## Enums

- [AzureWebPubSubRole](/reference/api/go/aspire.hosting.azure.webpubsub/azurewebpubsubrole.md) -- `enum` - 3 values -- Represents ATS-compatible Azure Web PubSub roles.

## Functions

- [AddEventHandler](/reference/api/go/aspire.hosting.azure.webpubsub/addeventhandler.md) -- `method` - on `AzureWebPubSubHubResource` -- Adds an event handler to an Azure Web PubSub hub.
- [AddHub](/reference/api/go/aspire.hosting.azure.webpubsub/addhub.md) -- `method` - on `AzureWebPubSubResource` -- Adds an Azure Web Pub Sub hub resource to the application model.
- [RunAsEmulator](/reference/api/go/aspire.hosting.azure.webpubsub/runasemulator.md) -- `method` - on `AzureWebPubSubResource` -- Configures Azure Web PubSub to run locally using the emulator container.
- [AddAzureWebPubSub](/reference/api/go/aspire.hosting.azure.webpubsub/addazurewebpubsub.md) -- `method` - on `DistributedApplicationBuilder` -- Adds an Azure Web PubSub resource to the application model. Change sku: WithParameter("sku", "Standard_S1") Change capacity: WithParameter("capacity", 2)
- [WithWebPubSubRoleAssignments](/reference/api/go/aspire.hosting.azure.webpubsub/withwebpubsubroleassignments.md) -- `method` - on `Resource` -- Assigns the specified roles to the given resource, granting it the necessary permissions on the target Azure Web PubSub resource. This replaces the default role assignments for the resource.
