# withOrleansClientReference

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

Adds an Orleans client to the resource.

## Definition

```typescript
interface ContainerResource {
  // ... omitted for brevity
  withOrleansClientReference(orleansServiceClient: OrleansServiceClient): IResourceWithEnvironment
}
```

## Parameters

- `orleansServiceClient` ([OrleansServiceClient](/reference/api/typescript/aspire.hosting.orleans/orleansserviceclient.md))

## Returns

`IResourceWithEnvironment` `builder`

## Applies to

- [ContainerResource](/reference/api/typescript/aspire.hosting.orleans/containerresource.md)
- [ExecutableResource](/reference/api/typescript/aspire.hosting.orleans/executableresource.md)
- [ProjectResource](/reference/api/typescript/aspire.hosting.orleans/projectresource.md)
- [DotnetToolResource](/reference/api/typescript/aspire.hosting.orleans/dotnettoolresource.md)
- [CSharpAppResource](/reference/api/typescript/aspire.hosting.orleans/csharpappresource.md)
