Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

FoundryResource

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

Represents a Microsoft Foundry resource. This corresponds to the Azure Cognitive Services account with Microsoft Foundry capabilities enabled.

type FoundryResource interface {
ExpressionValue
Resource
ResourceWithConnectionString
ResourceWithEndpoints
}

Methods

methodAddDeploymentbuilder
Adds a Microsoft Foundry deployment resource to a Microsoft Foundry resource.
AddDeployment(
name string,
model any,
options ...*AddDeploymentOptions,
) FoundryDeploymentResource
namestring
modelany
options...*AddDeploymentOptionsOptional settings, described under Options.

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

ModelVersion*string
Format*string
FoundryDeploymentResource

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

methodAddProjectbuilder
Adds a Microsoft Foundry project resource to the application model. This will also attach the project as a deployment target for agents.
AddProject(name string) AzureCognitiveServicesProjectResource
namestringThe name of the Microsoft Foundry project resource.
AzureCognitiveServicesProjectResource

The resource builder.

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

methodRunAsFoundryLocalbuilder
Configures a Microsoft Foundry resource to use an Aspire-managed or existing Foundry Local service.
RunAsFoundryLocal(options ...*RunAsFoundryLocalOptions) FoundryResource
options...*RunAsFoundryLocalOptionsOptional settings, described under Options.

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

Endpoint*stringThe endpoint of an existing Foundry Local service, or null for an Aspire-managed service.
FoundryResource

The configured Microsoft Foundry resource builder.

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