Skip to content
DocsTry Aspire
DocsTry

FoundryResource Methods

ClassMethods1 member
Represents a Microsoft Foundry resource. This corresponds to the Azure Cognitive Services account with Microsoft Foundry capabilities enabled.
AddAsExistingResource(AzureResourceInfrastructure)Section titled AddAsExistingResource(AzureResourceInfrastructure)overrideCognitiveServicesAccount
Adds a new Primitives.ProvisionableResource into infra. The new resource represents a reference to the current Azure.AzureProvisioningResource via https://learn.microsoft.com/azure/azure-resource-manager/bicep/existing-resource.
public class FoundryResource
{
public override CognitiveServicesAccount AddAsExistingResource(
AzureResourceInfrastructure infra)
{
// ...
}
}
infraAzureResourceInfrastructureThe Azure.AzureResourceInfrastructure to add the existing resource into.
CognitiveServicesAccountA new Primitives.ProvisionableResource, typically using the FromExisting method on the derived Primitives.ProvisionableResource class.