AzureRoleAssignmentResource Constructors
Class Constructors 1 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) { // ... }}Parameters
name string The name of the resource in the distributed application model. targetAzureResource AzureProvisioningResource The Azure resource that the roles are assigned on. ownerResource IResource? The Aspire resource that owns this set of role assignments, or null for global role assignments granted to the deployment principal. identityResource AzureUserAssignedIdentityResource? The user-assigned managed identity whose principal receives the role assignments, or null for global role assignments granted to the deployment principal. configureInfrastructure Action<AzureResourceInfrastructure> Callback to configure the Azure role assignment resources. Remarks
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.