Skip to content
Docs Try Aspire

withCommand

Function
📦 Aspire.Hosting v13.2.0-preview.1.26159.1
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) => ExecuteCommandResult, commandOptions?: CommandOptions): IResource
name string
displayName string
executeCommand (arg: ExecuteCommandContext) => ExecuteCommandResult
commandOptions CommandOptions optional
IResource

Applies to

This function is an extension method on the following types: