Skip to content
Docs Try Aspire

ResourceNotificationService

Handle TypeScript
📦 Aspire.Hosting.Python v13.2.0-preview.1.26159.1
interface ResourceNotificationService extends IDisposable {
publishResourceUpdate(
resource: IResource,
state?: string,
stateStyle?: string): void;
tryGetResourceState(resourceName: string): ResourceEventDto;
waitForDependencies(resource: IResource): void;
waitForResourceHealthy(resourceName: string): ResourceEventDto;
waitForResourceState(
resourceName: string,
targetState?: string): void;
waitForResourceStates(
resourceName: string,
targetStates: string[]): string;
}

Methods

method publishResourceUpdate
Publishes an update for a resource's state
publishResourceUpdate(
resource: IResource,
state?: string,
stateStyle?: string): void
resource IResource
state string optional
stateStyle string optional
method tryGetResourceState
Tries to get the current state of a resource
tryGetResourceState(resourceName: string): ResourceEventDto
resourceName string
ResourceEventDto
method waitForDependencies
Waits for all dependencies of a resource to be ready
waitForDependencies(resource: IResource): void
resource IResource
method waitForResourceHealthy
Waits for a resource to become healthy
waitForResourceHealthy(resourceName: string): ResourceEventDto
resourceName string
ResourceEventDto
method waitForResourceState
Waits for a resource to reach a specified state
waitForResourceState(
resourceName: string,
targetState?: string): void
resourceName string
targetState string optional
method waitForResourceStates
Waits for a resource to reach one of the specified states
waitForResourceStates(
resourceName: string,
targetStates: string[]): string
resourceName string
targetStates string[]
string