# DistributedApplicationBuilder.SubscribeAfterResourcesCreated

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

Subscribes to the AfterResourcesCreated event, which fires after all resources are created.

## Remarks

At this point, all resources have been instantiated but may not yet be running.
This is useful for performing cross-resource configuration.

## Definition

```go
type DistributedApplicationBuilder interface {
    // ... omitted for brevity
    SubscribeAfterResourcesCreated(callback func(arg AfterResourcesCreatedEvent)) DistributedApplicationEventSubscription
}
```

## Signature

```go
SubscribeAfterResourcesCreated(callback func(arg AfterResourcesCreatedEvent)) DistributedApplicationEventSubscription
```

## Parameters

- `callback` (`func(arg AfterResourcesCreatedEvent)`) -- A callback that receives the exported event when the event fires.

## Returns

[`DistributedApplicationEventSubscription`](/reference/api/go/aspire.hosting/distributedapplicationeventsubscription.md) -- A subscription handle that can be used to unsubscribe.

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

## Defined on

- [DistributedApplicationBuilder](/reference/api/go/aspire.hosting/distributedapplicationbuilder.md) -- `interface`
