# ResourceCommandService

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

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)
  ```
