# IConfiguration

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

## Definition

```typescript
interface IConfiguration {
  exists(key: string): boolean;
  getChildren(): IConfigurationSection[];
  getConfigValue(key: string): string;
  getConnectionString(name: string): string;
  getSection(key: string): IConfigurationSection;
}
```

## Methods

- [exists](/reference/api/typescript/aspire.hosting/iconfiguration/exists.md) -- `method` -- Checks whether a configuration section exists
    ```typescript
  exists(key: string): boolean
  ```
- [getChildren](/reference/api/typescript/aspire.hosting/iconfiguration/getchildren.md) -- `method` -- Gets child configuration sections
    ```typescript
  getChildren(): IConfigurationSection[]
  ```
- [getConfigValue](/reference/api/typescript/aspire.hosting/iconfiguration/getconfigvalue.md) -- `method` -- Gets a configuration value by key
    ```typescript
  getConfigValue(key: string): string
  ```
- [getConnectionString](/reference/api/typescript/aspire.hosting/iconfiguration/getconnectionstring.md) -- `method` -- Gets a connection string by name
    ```typescript
  getConnectionString(name: string): string
  ```
- [getSection](/reference/api/typescript/aspire.hosting/iconfiguration/getsection.md) -- `method` -- Gets a configuration section by key
    ```typescript
  getSection(key: string): IConfigurationSection
  ```
