# ExecuteCommandResult Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ExecuteCommandResult](/reference/api/csharp/aspire.hosting/executecommandresult.md)
- Kind: `Properties`
- Members: `5`

The result of executing a command. Returned from [ResourceCommandAnnotation.ExecuteCommand](/reference/api/csharp/aspire.hosting/resourcecommandannotation/properties.md#executecommand).

## Canceled

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

A flag that indicates whether the command was canceled by the user.

```csharp
public bool Canceled { get; init; }
```

## Data

- Name: `Data`
- Modifiers: `nullable` `get; init`
- Returns: [CommandResultData?](/reference/api/csharp/aspire.hosting/commandresultdata.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ResourceCommandAnnotation.cs)

An optional value produced by the command.

```csharp
public CommandResultData? Data { get; init; }
```

## ErrorMessage

> **Obsolete:** Use Message instead.

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

An optional error message that can be set when the command is unsuccessful.

```csharp
public string? ErrorMessage { get; init; }
```

## Message

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

An optional message associated with the command result.

```csharp
public string? Message { get; init; }
```

## Success

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

A flag that indicates whether the command was successful.

```csharp
public bool Success { get; init; }
```
