IResource.withCommand
Method
interface IResource { // ... omitted for brevity withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise<ExecuteCommandResult>, commandOptions?: CommandOptions): IResource;}Signature
method
withCommand builderAdds a resource command
withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise<ExecuteCommandResult>, commandOptions?: CommandOptions): IResourceParameters
namestringThe name of the command. The name uniquely identifies the command.displayName stringThe display name visible in UI.executeCommand (arg: ExecuteCommandContext) => Promise<ExecuteCommandResult> A callback that is executed when the command is executed. The callback is run inside the Aspire host. The callback result is used to indicate success or failure in the UI.commandOptions CommandOptions optionalOptional configuration for the command.Returns
IResource Defined on
This method is defined on the following type: