# PostgresServerResource.withUserName

- Module: [Aspire.Hosting.PostgreSQL](/reference/api/typescript/aspire.hosting.postgresql.md)
- Defined on: [PostgresServerResource](/reference/api/typescript/aspire.hosting.postgresql/postgresserverresource.md)
- Version: `13.4.0`
- Kind: `method`

Configures the user name that the PostgreSQL resource is used.

## Definition

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

## Signature

```typescript
withUserName(userName: ParameterResource): PostgresServerResource
```

## Parameters

- `userName` (`ParameterResource`)

## Returns

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

## Defined on

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