# Exists

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`Configuration`](/reference/api/go/aspire.hosting/configuration.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Checks whether a configuration section exists.

## Definition

```go
func (Configuration) Exists(key string) (bool, error)
```

## Parameters

- `key` (`string`) -- The configuration key.

## Returns

`(bool, error)` -- `true` when the section exists; otherwise, `false`.

Returns `(bool, error)`.

## Applies to

- [`Configuration`](/reference/api/go/aspire.hosting/configuration.md)
