# CommandOptions Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [CommandOptions](/reference/api/csharp/aspire.hosting/commandoptions.md)
- Kind: `Properties`
- Members: `7`

Optional configuration for resource commands added with [ResourceBuilderExtensions.WithCommand(IResourceBuilder<T>, string, string, Func<ExecuteCommandContext, Task<ExecuteCommandResult>>, CommandOptions?)](/reference/api/csharp/aspire.hosting/resourcebuilderextensions/methods.md#withcommand-iresourcebuilder-t-string-string-func-executecommandcontext-task-executecommandresult-commandoptions).

## ConfirmationMessage

- Name: `ConfirmationMessage`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CommandOptions.cs)

When a confirmation message is specified, the UI will prompt with an OK/Cancel dialog and the confirmation message before starting the command.

```csharp
public string? ConfirmationMessage { get; set; }
```

## Description

- Name: `Description`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CommandOptions.cs)

Optional description of the command, to be shown in the UI. Could be used as a tooltip. May be localized.

```csharp
public string? Description { get; set; }
```

## IconName

- Name: `IconName`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CommandOptions.cs)

The icon name for the command. The name should be a valid FluentUI icon name from [https://aka.ms/fluentui-system-icons](https://aka.ms/fluentui-system-icons).

```csharp
public string? IconName { get; set; }
```

## IconVariant

- Name: `IconVariant`
- Modifiers: `nullable` `get; set`
- Returns: [IconVariant?](/reference/api/csharp/aspire.hosting/iconvariant.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CommandOptions.cs)

The icon variant.

```csharp
public IconVariant? IconVariant { get; set; }
```

## IsHighlighted

- Name: `IsHighlighted`
- Modifiers: `get; set`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CommandOptions.cs)

A flag indicating whether the command is highlighted in the UI.

```csharp
public bool IsHighlighted { get; set; }
```

## Parameter

- Name: `Parameter`
- Modifiers: `nullable` `get; set`
- Returns: `object?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CommandOptions.cs)

Optional parameter that configures the command in some way. Clients must return any value provided by the server when invoking the command.

```csharp
public object? Parameter { get; set; }
```

## UpdateState

- Name: `UpdateState`
- Modifiers: `nullable` `get; set`
- Returns: `Func<UpdateCommandStateContext, ResourceCommandState>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CommandOptions.cs)

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.

```csharp
public Func<UpdateCommandStateContext, ResourceCommandState>? UpdateState { get; set; }
```
