# AzureWebPubSubResource

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

## Definition

```typescript
interface AzureWebPubSubResource
  extends IAzureResource,
    IManifestExpressionProvider,
    IResource,
    IResourceWithConnectionString,
    IResourceWithParameters,
    IValueProvider,
    IValueWithReferences,
    IAzurePrivateEndpointTarget {
  addHub(
      name: string,
      hubName?: string): AzureWebPubSubHubResource;
}
```

## Methods

- [addHub](/reference/api/typescript/aspire.hosting.azure.webpubsub/azurewebpubsubresource/addhub.md) -- `method` -- Adds a hub to the Azure Web PubSub resource.
    ```typescript
  addHub(name: string, hubName?: string): AzureWebPubSubHubResource
  ```
