ReferenceRoleAssignmentAnnotation
ReferenceRoleAssignmentAnnotation.Roles on the Azure resource ReferenceRoleAssignmentAnnotation.Target . namespace Aspire.Hosting.Azure;
public sealed class ReferenceRoleAssignmentAnnotation : Aspire.Hosting.ApplicationModel.IResourceAnnotation{ // ...}Remarks
Section titled Remarks This annotation is applied to a resource that "fronts" an Azure resource without being an I itself. For example, a Foundry hosted agent's node app is a plain compute resource, but invoking the agent requires the caller to hold a role on the owning Foundry account. The account is only a transitive dependency of a consumer, so Azure. 's normal reference walk — which only acts on direct I dependencies — cannot reach it.
When a compute resource takes a direct dependency on a resource carrying this annotation, Azure. folds (Target, into the same role-assignment path used for direct Azure references, so the consumer gets a managed identity and the corresponding role assignment on Reference with no additional wiring.
Constructors1
Section titled ConstructorsReferenceRoleAssignmentAnnotation.Roles on the Azure resource ReferenceRoleAssignmentAnnotation.Target . Properties2
Section titled PropertiesRolesgetReferenceRoleAssignmentAnnotation.Target . Targetget