# ResourceCommandAnnotation Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ResourceCommandAnnotation](/reference/api/csharp/aspire.hosting/resourcecommandannotation.md)
- Kind: `Properties`
- Members: `10`

Represents a command annotation for a resource.

## ConfirmationMessage

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

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; }
```

## DisplayDescription

- Name: `DisplayDescription`
- Modifiers: `nullable` `get`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResourceCommandAnnotation.cs#L73)

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

```csharp
public string? DisplayDescription { get; }
```

## DisplayName

- Name: `DisplayName`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResourceCommandAnnotation.cs#L55)

The display name visible in UI.

```csharp
public string DisplayName { get; }
```

## ExecuteCommand

- Name: `ExecuteCommand`
- Modifiers: `get`
- Returns: `Func<ExecuteCommandContext, Task<ExecuteCommandResult>>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResourceCommandAnnotation.cs#L67)

A callback that is executed when the command is executed. The result is used to indicate success or failure in the UI.

```csharp
public Func<ExecuteCommandContext, Task<ExecuteCommandResult>> ExecuteCommand { get; }
```

## IconName

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

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

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

## IconVariant

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

The icon variant for the command.

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

## IsHighlighted

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

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

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

## Name

- Name: `Name`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResourceCommandAnnotation.cs#L50)

The name of command. The name uniquely identifies the command.

```csharp
public string Name { get; }
```

## Parameter

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

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; }
```

## UpdateState

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

A callback that is used to update the command state. The callback is executed when the command's resource snapshot is updated.

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