# subscribeHttpsEndpointsUpdate

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Version: `13.5.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/e076d8e427cb3afb528dbd605acd74c3aea69f94)

Subscribes to the `BeforeStartEvent` and invokes the specified callback when an HTTPS certificate is determined to be available for the resource. This is used to conditionally update endpoint URI schemes or perform other HTTPS-related configuration at startup.

## Definition

```typescript
interface ContainerResource {
  // ... omitted for brevity
  subscribeHttpsEndpointsUpdate(callback: (obj: HttpsEndpointUpdateCallbackContext) => Promise<void>): IResource
}
```

## Parameters

- `callback` (`(obj: HttpsEndpointUpdateCallbackContext) => Promise<void>`)

## Returns

[IResource](/reference/api/typescript/aspire.hosting/iresource.md) `builder`

## Applies to

- [ContainerResource](/reference/api/typescript/aspire.hosting/containerresource.md)
- [ExecutableResource](/reference/api/typescript/aspire.hosting/executableresource.md)
- [ProjectResource](/reference/api/typescript/aspire.hosting/projectresource.md)
- [ParameterResource](/reference/api/typescript/aspire.hosting/parameterresource.md)
- [ContainerRegistryResource](/reference/api/typescript/aspire.hosting/containerregistryresource.md)
- [DotnetToolResource](/reference/api/typescript/aspire.hosting/dotnettoolresource.md)
- [ExternalServiceResource](/reference/api/typescript/aspire.hosting/externalserviceresource.md)
- [CSharpAppResource](/reference/api/typescript/aspire.hosting/csharpappresource.md)
