# ServiceDependency Properties

- Package: [Aspire.Hosting.Docker](/reference/api/csharp/aspire.hosting.docker.md)
- Type: [ServiceDependency](/reference/api/csharp/aspire.hosting.docker/servicedependency.md)
- Kind: `Properties`
- Members: `1`

Represents a service dependency in a Docker Compose file.

## Condition

- Name: `Condition`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Docker/Resources/ComposeNodes/ServiceDependency.cs)

Gets or sets the condition under which the service should be started.

```csharp
public string? Condition { get; set; }
```
