# AzureAppConfigurationEmulatorResource.WithHostPort

- Module: [Aspire.Hosting.Azure.AppConfiguration](/reference/api/go/aspire.hosting.azure.appconfiguration.md)
- Defined on: [AzureAppConfigurationEmulatorResource](/reference/api/go/aspire.hosting.azure.appconfiguration/azureappconfigurationemulatorresource.md)
- Version: `17.0.0`
- Kind: `method`

Configures the host port for the Azure App Configuration emulator is exposed on instead of using randomly assigned port.

## Definition

```go
type AzureAppConfigurationEmulatorResource interface {
    // ... omitted for brevity
    WithHostPort(port *float64) AzureAppConfigurationEmulatorResource
}
```

## Signature

```go
WithHostPort(port *float64) AzureAppConfigurationEmulatorResource
```

## Parameters

- `port` (`*float64`) -- The port to bind on the host. If `null` is used, a random port will be assigned.

## Returns

[`AzureAppConfigurationEmulatorResource`](/reference/api/go/aspire.hosting.azure.appconfiguration/azureappconfigurationemulatorresource.md) -- The resource builder.

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

## Defined on

- [AzureAppConfigurationEmulatorResource](/reference/api/go/aspire.hosting.azure.appconfiguration/azureappconfigurationemulatorresource.md) -- `handle`
