# IResourceWithConnectionString.getConnectionProperty

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

Retrieves the value of a specified connection property from the resource's connection properties.

## Definition

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

## Signature

```typescript
getConnectionProperty(key: string): ReferenceExpression
```

## Parameters

- `key` (`string`)

## Returns

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

## Defined on

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