# getConnectionProperty

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

Gets a connection property by key

## Definition

```typescript
interface IResourceWithConnectionString {
  // ... omitted for brevity
  getConnectionProperty(key: string): ReferenceExpression
}
```

## Parameters

- `key` (`string`)

## Returns

[ReferenceExpression](/reference/api/typescript/aspire.hosting/referenceexpression.md)

## Applies to

- [IResourceWithConnectionString](/reference/api/typescript/aspire.hosting/iresourcewithconnectionstring.md)
