AzureCognitiveServicesProjectResource
Class net8.0
The Microsoft Foundry project resource that can be used for Microsoft Foundry AI agents. This also functions as an Aspire compute environment resource for deployment.
namespace Aspire.Hosting.Foundry;
public class AzureCognitiveServicesProjectResource : Aspire.Hosting.Foundry.AzureProvisionableAspireResourceWithParent<Azure.Provisioning.CognitiveServices.CognitiveServicesProject, Aspire.Hosting.Foundry.FoundryResource>, Aspire.Hosting.ApplicationModel.IComputeEnvironmentResource, Aspire.Hosting.ApplicationModel.IManifestExpressionProvider, Aspire.Hosting.ApplicationModel.IResource, Aspire.Hosting.ApplicationModel.IResourceWithConnectionString, Aspire.Hosting.ApplicationModel.IValueProvider, Aspire.Hosting.ApplicationModel.IValueWithReferences, Aspire.Hosting.Azure.IAzureComputeEnvironmentResource{ // ...} AzureProvisionableAspireResourceWithParent<CognitiveServicesProject, FoundryResource>IComputeEnvironmentResourceIManifestExpressionProviderIResourceIResourceWithConnectionStringIValueProviderIValueWithReferencesIAzureComputeEnvironmentResource
13 members
Constructors1
Section titled ConstructorsProperties9
Section titled PropertiesAppInsightsget; setAzureApplicationInsightsResource? The Application Insights resource associated with this project, if any. This will be used as the destination for server-side telemetry from hosted agents and optionally for client-side telemetry if the application decides to use it.
CapabilityHostConfigurationget; set The capability host resources associated with this project, if any
ConnectionStringExpressiongetReferenceExpression Gets the .NET-style connection string for the project API endpoint.
ContainerRegistrygetAzureContainerRegistryResource? Gets the Azure Container Registry resource used by this project.
EndpointgetBicepOutputReference Gets the "endpoint" output reference from the Microsoft Foundry project resource. This will be used to instantiate the AI project clients. Will be of the format https:/{accountName}.services.ai.azure.com/api/projects/{projectName}?api-version={apiVersion}
IdgetBicepOutputReference Azure Resource ID output reference.
KeyVaultConnget; set Connection to the user-assigned key vault, if any.
PrincipalIdgetBicepOutputReference Gets the managed identity principal ID, whether system-assigned or user-assigned.
UriExpressiongetReferenceExpression Gets the Microsoft Foundry project endpoint as a ReferenceExpression that can be used in environment variables or connection strings. This will be used to instantiate the AI project clients. Will be of the format https:/{accountName}.services.ai.azure.com/api/projects/{projectName}?api-version={apiVersion}
Methods3
Section titled MethodsFromExisting(string)CognitiveServicesProject Gets the Azure.Provisioning resource from an existing Bicep identifier. Because static methods can't be abstract, this is an instance method.
SetName(CognitiveServicesProject, BicepValue<string>) Sets the name of the provisionable resource. This is needed because not all ProvisionableResource classes have a name property with a setter, and we can't put a type bound on T to require it.
TryGetAppIdentityResource(IAppIdentityResource?)bool Tries to get the application identity resource associated with this project via the
Azure.AppIdentityAnnotation. This is the identity that will be used by the project to access other Azure resources such as the container registry.