# InitializeResourceEvent

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

This event is raised by orchestrators to signal to resources that they should initialize themselves.

## Remarks

Custom resources can subscribe to this event to perform initialization tasks, including starting background tasks
that manage the resource's lifecycle.

## Definition

```go
type InitializeResourceEvent interface {
    DistributedApplicationEvent
    DistributedApplicationResourceEvent
}
```

## Embeds

- [`DistributedApplicationEvent`](/reference/api/go/aspire.hosting/distributedapplicationevent.md)
- [`DistributedApplicationResourceEvent`](/reference/api/go/aspire.hosting/distributedapplicationresourceevent.md)

## Properties

- `Eventing`: [`DistributedApplicationEventing`](/reference/api/go/aspire.hosting/distributedapplicationeventing.md) `get` -- The `IDistributedApplicationEventing` service for the AppHost.
- `Logger`: [`Logger`](/reference/api/go/aspire.hosting/logger.md) `get` -- An instance of `ILogger` that can be used to log messages for the resource.
- `Notifications`: [`ResourceNotificationService`](/reference/api/go/aspire.hosting/resourcenotificationservice.md) `get` -- The `ResourceNotificationService` for the AppHost.
- `Resource`: [`Resource`](/reference/api/go/aspire.hosting/resource.md) `get` -- Gets the Resource property
- `Services`: [`ServiceProvider`](/reference/api/go/aspire.hosting/serviceprovider.md) `get` -- The `IServiceProvider` for the AppHost.
