Skip to content
DocsTry Aspire
DocsTry

AzureCognitiveServicesProjectResource Methods

ClassMethods3 members
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.
FromExisting(string)Section titled FromExisting(string)overrideCognitiveServicesProject
Gets the Azure.Provisioning resource from an existing Bicep identifier. Because static methods can't be abstract, this is an instance method.
public class AzureCognitiveServicesProjectResource
{
public override CognitiveServicesProject FromExisting(
string bicepIdentifier)
{
// ...
}
}
bicepIdentifierstring
SetName(CognitiveServicesProject, BicepValue<string>)Section titled SetName(CognitiveServicesProject, BicepValue<string>)override
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.
public class AzureCognitiveServicesProjectResource
{
public override void SetName(
CognitiveServicesProject provisionableResource,
BicepValue<string> name)
{
// ...
}
}
provisionableResourceCognitiveServicesProject
nameBicepValue<string>
TryGetAppIdentityResource(IAppIdentityResource?)Section titled 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.
public class AzureCognitiveServicesProjectResource
{
public bool TryGetAppIdentityResource(
out IAppIdentityResource? identity)
{
// ...
}
}
identityIAppIdentityResource?