ResourceNotificationService.WaitForResourceHealthyAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Waits for a resource to become healthy.
public System.Threading.Tasks.Task<Aspire.Hosting.ApplicationModel.ResourceEvent> WaitForResourceHealthyAsync (string resourceName, System.Threading.CancellationToken cancellationToken = default);
member this.WaitForResourceHealthyAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.ApplicationModel.ResourceEvent>
Public Function WaitForResourceHealthyAsync (resourceName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceEvent)
Parameters
- resourceName
- String
The name of the resource.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
A task.
Remarks
This method returns a task that will complete with the resource is healthy. A resource without HealthCheckAnnotation annotations will be considered healthy.