# ResourceCommandService

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

A service to execute resource commands.

## Definition

```typescript
interface ResourceCommandService {
  executeCommandAsync(
      resource: IResource,
      commandName: string,
      arguments?: Dict<string,string>,
      cancellationToken?: cancellationToken): ExecuteCommandResult;
}
```

## Methods

- [executeCommandAsync](/reference/api/typescript/aspire.hosting/resourcecommandservice/executecommandasync.md) -- `method` -- Executes a command for the specified resource.
    ```typescript
  executeCommandAsync(resource: IResource, commandName: string, arguments?: Dict<string,string>, cancellationToken?: cancellationToken): ExecuteCommandResult
  ```
