# EndpointReference.getTlsValue

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

Gets a conditional expression that resolves to the enabledValue when TLS is enabled on the endpoint, or to the disabledValue otherwise.

## Definition

```typescript
interface EndpointReference {
  // ... omitted for brevity
  getTlsValue(
      enabledValue: ReferenceExpression,
      disabledValue: ReferenceExpression): ReferenceExpression;
}
```

## Signature

```typescript
getTlsValue(
    enabledValue: ReferenceExpression,
    disabledValue: ReferenceExpression): ReferenceExpression
```

## Parameters

- `enabledValue` ([ReferenceExpression](/reference/api/typescript/aspire.hosting/referenceexpression.md))
- `disabledValue` ([ReferenceExpression](/reference/api/typescript/aspire.hosting/referenceexpression.md))

## Returns

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

## Defined on

- [EndpointReference](/reference/api/typescript/aspire.hosting/endpointreference.md) -- `handle`
