Skip to content
DocsTry Aspire
DocsTry

withCommand

Method
📦 Aspire.Hosting v13.4.0
interface ContainerResource {
// ... omitted for brevity
withCommand(
name: string,
displayName: string,
executeCommand: callback,
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

Applies to

This method applies to the following types: