Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

HostedAgentOptions

Struct
📦 Aspire.Hosting.Foundry v17.0.0-preview.1.26565.2

Options that control how a compute resource is deployed as a Microsoft Foundry hosted agent. All properties are optional; unset properties fall back to the Foundry hosted agent defaults.

type HostedAgentOptions struct {
Description *string `json:"Description"`
Cpu *float64 `json:"Cpu"`
Memory *float64 `json:"Memory"`
Metadata map[string]string `json:"Metadata"`
EnvironmentVariables map[string]string `json:"EnvironmentVariables"`
}

Fields

Description*string
Human-readable description of the hosted agent surfaced in the Microsoft Foundry portal. When not set, the hosted agent default description is used.
Cpu*float64optional
CPU allocation for each hosted agent instance, in vCPU cores. Must be between 0.5 and 3.5 in increments of 0.25. When not set, the hosted agent default CPU allocation is used.
Memory*float64optional
Memory allocation for each hosted agent instance, in GiB. Must be between 1 and 7 in increments of 0.5 and equal to twice the CPU value. When not set, the hosted agent default memory allocation is used.
Metadatamap[string]stringoptional
Additional metadata key/value pairs to attach to the hosted agent definition. Entries with the same key as an existing metadata entry overwrite it.
EnvironmentVariablesmap[string]stringoptional
Environment variables to set on the hosted agent container at runtime. Entries with the same key as an existing environment variable overwrite it.