Skip to content
Docs Try Aspire
Docs Try

ResourceCommandAnnotation

Class sealed net8.0
📦 Aspire.Hosting v13.4.0
Represents a command annotation for a resource.
namespace Aspire.Hosting.ApplicationModel;
public sealed class ResourceCommandAnnotation
: Aspire.Hosting.ApplicationModel.IResourceAnnotation
{
// ...
}
View all constructors
Argumentsgetexperimental
Gets the invocation arguments accepted by the command.
ConfirmationMessageget
string?
When a confirmation message is specified, the UI will prompt with an OK/Cancel dialog and the confirmation message before starting the command.
DisplayDescriptionget
string?
Optional description of the command, to be shown in the UI. Could be used as a tooltip. May be localized.
DisplayNameget
string
The display name visible in UI.
ExecuteCommandget
Func<ExecuteCommandContext, Task<ExecuteCommandResult>>
A callback that is executed when the command is executed. The result is used to indicate success or failure in the UI.
IconNameget
string?
The icon name for the command. The name should be a valid FluentUI icon name. https://aka.ms/fluentui-system-icons
IconVariantget
The icon variant for the command.
IsHighlightedget
bool
A flag indicating whether the command is highlighted in the UI.
Nameget
string
The name of command. The name uniquely identifies the command.
Parametergetobsolete
object?
Obsolete optional parameter that configures the command in some way. Clients must return any value provided by the server when invoking the command.
UpdateStateget
Func<UpdateCommandStateContext, ResourceCommandState>
A callback that is used to update the command state. The callback is executed when the command's resource snapshot is updated.
ValidateArgumentsgetexperimental
Func<InputsDialogValidationContext, Task>
Gets the callback that validates invocation arguments before the command callback is executed.
Visibilityget
Gets where the command is visible to users and clients.
View all properties