CommandOptions
Struct
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"`}11 members
Fields
Description*stringOptional description of the command, to be shown in the UI. Could be used as a tooltip. May be localized.
ParameteranyObsolete 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.
ValidateArguments func(...any) any callbackGets 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 *stringWhen a confirmation message is specified, the UI will prompt with an OK/Cancel dialog and the confirmation message before starting the command.
IconName *stringThe icon name for the command. The name should be a valid FluentUI icon name from .
IconVariant *IconVariant optionalThe icon variant.
IsHighlighted boolA flag indicating whether the command is highlighted in the UI.
UpdateState func(...any) any callbackA 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.