# AddAzureWebPubSub

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

Adds an Azure Web PubSub resource to the application model. Change sku: WithParameter("sku", "Standard_S1") Change capacity: WithParameter("capacity", 2)

## Definition

```go
func (DistributedApplicationBuilder) AddAzureWebPubSub(name string) AzureWebPubSubResource
```

## Parameters

- `name` (`string`) -- The name of the resource. This name will be used as the connection string name when referenced in a dependency.

## Returns

[`AzureWebPubSubResource`](/reference/api/go/aspire.hosting.azure.webpubsub/azurewebpubsubresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Applies to

- `DistributedApplicationBuilder`
