# ResourceCommandService

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

A service to execute resource commands.

## Definition

```go
type ResourceCommandService interface{}
```

## Methods

- [ExecuteCommandAsync](/reference/api/go/aspire.hosting/resourcecommandservice/executecommandasync.md) -- `method` -- Executes a command for the specified resource.
  ```go
  ExecuteCommandAsync(resource any, commandName string, options ...*ExecuteCommandAsyncOptions) (*ExecuteCommandResult, error)
  ```
