Skip to content
Docs Try Aspire
Docs Try

withCommand

Method
📦 Aspire.Hosting v13.2.0
interface ContainerResource {
// ... omitted for brevity
withCommand(
name: string,
displayName: string,
executeCommand: callback,
commandOptions?: CommandOptions): IResource;
}

Signature

method withCommand builder
Adds a resource command
withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise<ExecuteCommandResult>, commandOptions?: CommandOptions): IResource
name string
displayName string
executeCommand (arg: ExecuteCommandContext) => Promise<ExecuteCommandResult>
commandOptions CommandOptions optional
IResource

Applies to

This method applies to the following types: