# PostgresServerResource.withPassword

- 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 password that the PostgreSQL resource is used.

## Definition

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

## Signature

```typescript
withPassword(password: ParameterResource): PostgresServerResource
```

## Parameters

- `password` (`ParameterResource`)

## Returns

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

## Defined on

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