Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

CommandOptions

Struct
📦 Aspire.Hosting v17.0.0

Optional configuration for resource commands.

type CommandOptions struct {
Description *string `json:"Description"`
Parameter any `json:"Parameter"`
Arguments []*InteractionInput `json:"Arguments"`
ValidateArguments func(...any) any `json:"ValidateArguments"`
Visibility ResourceCommandVisibility `json:"Visibility"`
ConfirmationMessage *string `json:"ConfirmationMessage"`
IconName *string `json:"IconName"`
IconVariant *IconVariant `json:"IconVariant"`
IsHighlighted bool `json:"IsHighlighted"`
UpdateState func(...any) any `json:"UpdateState"`
Progress *CommandProgressOptions `json:"Progress"`
}

Fields

Description*string
Optional description of the command, to be shown in the UI. Could be used as a tooltip. May be localized.
Parameterany
Obsolete optional parameter that configures the command in some way. Clients must return any value provided by the server when invoking the command.
Arguments[]*InteractionInput
Gets or sets the invocation arguments accepted by the command.
ValidateArgumentsfunc(...any) anycallback
Gets or sets the callback that validates invocation arguments before the command callback is executed.
VisibilityResourceCommandVisibility
Gets or sets where the command is visible to users and clients.
ConfirmationMessage*string
When a confirmation message is specified, the UI will prompt with an OK/Cancel dialog and the confirmation message before starting the command.
IconName*string
The icon name for the command. The name should be a valid FluentUI icon name from .
IconVariant*IconVariantoptional
The icon variant.
IsHighlightedbool
A flag indicating whether the command is highlighted in the UI.
UpdateStatefunc(...any) anycallback
A callback that is used to update the command state. The callback is executed when the command's resource snapshot is updated. If a callback isn't specified, the command is always enabled.
Progress*CommandProgressOptions
Gets or sets options for displaying a progress dialog while the command is executing.