# AzureWebPubSubResource.RunAsEmulator

- Module: [Aspire.Hosting.Azure.WebPubSub](/reference/api/go/aspire.hosting.azure.webpubsub.md)
- Defined on: [AzureWebPubSubResource](/reference/api/go/aspire.hosting.azure.webpubsub/azurewebpubsubresource.md)
- Version: `17.0.0`
- Kind: `method`

Configures Azure Web PubSub to run locally using the emulator container.

## Remarks

This method has no effect when publishing. Hub event handlers are configured in the emulator,
but event handler authentication is not supported.

## Definition

```go
type AzureWebPubSubResource interface {
    // ... omitted for brevity
    RunAsEmulator(options ...*RunAsEmulatorOptions) AzureWebPubSubResource
}
```

## Signature

```go
RunAsEmulator(options ...*RunAsEmulatorOptions) AzureWebPubSubResource
```

## Parameters

- `options` (`...*RunAsEmulatorOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*RunAsEmulatorOptions` argument.

- `ConfigureContainer` (`func(obj AzureWebPubSubEmulatorResource)`) `callback` -- An optional callback to configure the emulator container.

## Returns

[`AzureWebPubSubResource`](/reference/api/go/aspire.hosting.azure.webpubsub/azurewebpubsubresource.md) -- A reference to the `IResourceBuilder`.

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

## Defined on

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