# ResourceEndpointsAllocatedEvent Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ResourceEndpointsAllocatedEvent](/reference/api/csharp/aspire.hosting/resourceendpointsallocatedevent.md)
- Kind: `Constructors`
- Members: `1`

This event is raised by orchestrators to signal to resources that their endpoints have been allocated.

## ResourceEndpointsAllocatedEvent(IResource, IServiceProvider)

- Name: `Constructor(IResource, IServiceProvider)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResourceEndpointsAllocatedEvent.cs#L15-L21)

This event is raised by orchestrators to signal to resources that their endpoints have been allocated.

```csharp
public class ResourceEndpointsAllocatedEvent
{
    public ResourceEndpointsAllocatedEvent(
        IResource resource,
        IServiceProvider services)
    {
        // ...
    }
}
```

## Parameters

- `resource` ([IResource](/reference/api/csharp/aspire.hosting/iresource.md))
- `services` (`IServiceProvider`)

## Remarks

Any resources that customize their URLs via a [ResourceUrlsCallbackAnnotation](/reference/api/csharp/aspire.hosting/resourceurlscallbackannotation.md) will have their callbacks invoked during this event.
