Skip to content
DocsTry Aspire
DocsTry

AzureRoleAssignmentResource Constructors

ClassConstructors1 member
Represents a set of Azure role assignments granted on a target Azure resource.
Constructor(string, AzureProvisioningResource, IResource?, AzureUserAssignedIdentityResource?, Action<AzureResourceInfrastructure>)Section titled Constructor(string, AzureProvisioningResource, IResource?, AzureUserAssignedIdentityResource?, Action<AzureResourceInfrastructure>)
Represents a set of Azure role assignments granted on a target Azure resource.
public sealed class AzureRoleAssignmentResource
{
public AzureRoleAssignmentResource(
string name,
AzureProvisioningResource targetAzureResource,
IResource? ownerResource,
AzureUserAssignedIdentityResource? identityResource,
Action<AzureResourceInfrastructure> configureInfrastructure)
{
// ...
}
}
namestringThe name of the resource in the distributed application model.
targetAzureResourceAzureProvisioningResourceThe Azure resource that the roles are assigned on.
ownerResourceIResource?The Aspire resource that owns this set of role assignments, or null for global role assignments granted to the deployment principal.
identityResourceAzureUserAssignedIdentityResource?The user-assigned managed identity whose principal receives the role assignments, or null for global role assignments granted to the deployment principal.
configureInfrastructureAction<AzureResourceInfrastructure>Callback to configure the Azure role assignment resources.
When AzureRoleAssignmentResource.OwnerResource is non- null, the role assignments are granted to the managed identity ( AzureRoleAssignmentResource.IdentityResource) owned by that Aspire resource. When AzureRoleAssignmentResource.OwnerResource is null, the role assignments are global and are granted to the deployment principal.