Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

InteractionService.CreateChoiceInput

Method
📦 Aspire.Hosting v17.0.0
type InteractionService interface {
// ... omitted for brevity
CreateChoiceInput(
name string,
options ...*CreateChoiceInputOptions,
) InteractionInputBuilder
}

Signature

methodCreateChoiceInput
Creates a choice input that selects from a list of options.
CreateChoiceInput(
name string,
options ...*CreateChoiceInputOptions,
) InteractionInputBuilder
namestringThe name of the input.
options...*CreateChoiceInputOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*CreateChoiceInputOptions argument.

Choices[]*InteractionChoiceOptionThe available choices, in display order. Each option pairs a submitted value with a display label.
Options*CreateInteractionInputOptionsOptional configuration for the input.
InteractionInputBuilder

Returns a handle; failures surface later via Err().

Defined on

This method is defined on the following type: