# CommandOptions

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `struct`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Optional configuration for resource commands.

## Definition

```go
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.
- `Parameter`: `any` -- 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`](/reference/api/go/aspire.hosting/interactioninput.md) -- Gets or sets the invocation arguments accepted by the command.
- `ValidateArguments`: `func(...any) any` `callback` -- Gets or sets the callback that validates invocation arguments before the command callback is executed.
- `Visibility`: [`ResourceCommandVisibility`](/reference/api/go/aspire.hosting/resourcecommandvisibility.md) -- 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`: [`*IconVariant`](/reference/api/go/aspire.hosting/iconvariant.md) `optional` -- The icon variant.
- `IsHighlighted`: `bool` -- A flag indicating whether the command is highlighted in the UI.
- `UpdateState`: `func(...any) any` `callback` -- 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`](/reference/api/go/aspire.hosting/commandprogressoptions.md) -- Gets or sets options for displaying a progress dialog while the command is executing.
