# DistributedApplicationModel.FindResourceByName

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Defined on: [DistributedApplicationModel](/reference/api/go/aspire.hosting/distributedapplicationmodel.md)
- Version: `17.0.0`
- Kind: `method`

Finds a resource by name.

## Definition

```go
type DistributedApplicationModel interface {
    // ... omitted for brevity
    FindResourceByName(name string) Resource
}
```

## Signature

```go
FindResourceByName(name string) Resource
```

## Parameters

- `name` (`string`) -- The resource name.

## Returns

[`Resource`](/reference/api/go/aspire.hosting/resource.md) -- The matching resource, or `null` when not found.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [DistributedApplicationModel](/reference/api/go/aspire.hosting/distributedapplicationmodel.md) -- `handle`
