# ResourceCommandSnapshot Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ResourceCommandSnapshot](/reference/api/csharp/aspire.hosting/resourcecommandsnapshot.md)
- Kind: `Constructors`
- Members: `1`

A snapshot of a resource command.

## ResourceCommandSnapshot(string, ResourceCommandState, string, string?, object?, string?, string?, IconVariant?, bool)

- Name: `Constructor(string, ResourceCommandState, string, string?, object?, string?, string?, IconVariant?, bool)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CustomResourceSnapshot.cs#L296)

A snapshot of a resource command.

```csharp
public record ResourceCommandSnapshot
{
    public ResourceCommandSnapshot(
        string Name,
        ResourceCommandState State,
        string DisplayName,
        string? DisplayDescription,
        object? Parameter,
        string? ConfirmationMessage,
        string? IconName,
        IconVariant? IconVariant,
        bool IsHighlighted)
    {
        // ...
    }
}
```

## Parameters

- `Name` (`string`)
  The name of command. The name uniquely identifies the command.
- `State` ([ResourceCommandState](/reference/api/csharp/aspire.hosting/resourcecommandstate.md))
  The state of the command.
- `DisplayName` (`string`)
  The display name visible in UI for the command.
- `DisplayDescription` (`string?`)
  Optional description of the command, to be shown in the UI. Could be used as a tooltip. May be localized.
- `Parameter` (`object?`)
  Optional parameter that configures the command in some way. Clients must return any value provided by the server when invoking the command.
- `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. https://aka.ms/fluentui-system-icons
- `IconVariant` ([IconVariant?](/reference/api/csharp/aspire.hosting/iconvariant.md))
  The icon variant.
- `IsHighlighted` (`bool`)
  A flag indicating whether the command is highlighted in the UI.
