# withUserName

- Module: [Aspire.Hosting.PostgreSQL](/reference/api/typescript/aspire.hosting.postgresql.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

Configures the user name that the PostgreSQL resource is used.

## Definition

```typescript
interface PostgresServerResource {
  // ... omitted for brevity
  withUserName(userName: ParameterResource): PostgresServerResource
}
```

## Parameters

- `userName` (`ParameterResource`)

## Returns

[PostgresServerResource](/reference/api/typescript/aspire.hosting.postgresql/postgresserverresource.md) `builder`

## Applies to

- [PostgresServerResource](/reference/api/typescript/aspire.hosting.postgresql/postgresserverresource.md)
