# AzureWebPubSubHubResource

- Module: [Aspire.Hosting.Azure.WebPubSub](/reference/api/go/aspire.hosting.azure.webpubsub.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

## Definition

```go
type AzureWebPubSubHubResource interface {
    ExpressionValue
    Resource
    ResourceWithConnectionString
    ResourceWithParent
}
```

## Embeds

- `ExpressionValue`
- `Resource`
- `ResourceWithConnectionString`
- `ResourceWithParent`

## Methods

- [AddEventHandler](/reference/api/go/aspire.hosting.azure.webpubsub/azurewebpubsubhubresource/addeventhandler.md) -- `method` -- Adds an event handler to an Azure Web PubSub hub.
  ```go
  AddEventHandler(urlExpression *ReferenceExpression, options ...*AddEventHandlerOptions) AzureWebPubSubHubResource
  ```
