# ResourceEndpointsAllocatedEvent

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResourceEndpointsAllocatedEvent.cs)
- Implements: [IDistributedApplicationEvent](/reference/api/csharp/aspire.hosting/idistributedapplicationevent.md), [IDistributedApplicationResourceEvent](/reference/api/csharp/aspire.hosting/idistributedapplicationresourceevent.md)

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

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public class ResourceEndpointsAllocatedEvent
    : Aspire.Hosting.Eventing.IDistributedApplicationEvent,
      Aspire.Hosting.Eventing.IDistributedApplicationResourceEvent
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting/ResourceEndpointsAllocatedEvent`
- Public instance properties are exported as ATS capabilities.

## 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.

## Constructors

- [ResourceEndpointsAllocatedEvent(IResource, IServiceProvider)](/reference/api/csharp/aspire.hosting/resourceendpointsallocatedevent/constructors.md#constructor-iresource-iserviceprovider) -- This event is raised by orchestrators to signal to resources that their endpoints have been allocated.

## Properties

- [Resource](/reference/api/csharp/aspire.hosting/resourceendpointsallocatedevent/properties.md#resource) : [IResource](/reference/api/csharp/aspire.hosting/iresource.md) `get` -- Resource associated with this event.
- [Services](/reference/api/csharp/aspire.hosting/resourceendpointsallocatedevent/properties.md#services) : `IServiceProvider` `get` -- The `IServiceProvider` instance.
