Skip to content
DocsTry Aspire
DocsTry

IResource.withCommand

Method
📦 Aspire.Hosting v13.4.0
interface IResource {
// ... omitted for brevity
withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise<ExecuteCommandResult>, commandOptions?: CommandOptions): IResource;
}

Signature

methodwithCommandbuilder
Adds a resource command
withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise<ExecuteCommandResult>, commandOptions?: CommandOptions): IResource
namestring
displayNamestring
executeCommand(arg: ExecuteCommandContext) => Promise<ExecuteCommandResult>
commandOptionsCommandOptionsoptional
IResource

Defined on

This method is defined on the following type: