# InteractionInputCollection

- 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 collection of interaction inputs that supports both indexed and name-based access.

## Definition

```go
type InteractionInputCollection interface{}
```

## Methods

- [ToArray](/reference/api/go/aspire.hosting/interactioninputcollection/toarray.md) -- `method` -- Gets all inputs in declaration order.
  ```go
  ToArray() ([]*InteractionInput, error)
  ```
- `Get` -- `method` -- Get returns the input with the specified name, or nil if no input matches.
  ```go
  Get(name string) (*InteractionInput, error)
  ```
- `Required` -- `method` -- Required returns the input with the specified name, or an error if no input matches.
  ```go
  Required(name string) (*InteractionInput, error)
  ```
- `Value` -- `method` -- Value returns the value of the input with the specified name, or an empty string if no input matches or it has no value.
  ```go
  Value(name string) (string, error)
  ```
- `RequiredValue` -- `method` -- RequiredValue returns the value of the input with the specified name, or an error if no input matches.
  ```go
  RequiredValue(name string) (string, error)
  ```
