# ReferenceRoleAssignmentAnnotation Properties

- Package: [Aspire.Hosting.Azure](/reference/api/csharp/aspire.hosting.azure.md)
- Type: [ReferenceRoleAssignmentAnnotation](/reference/api/csharp/aspire.hosting.azure/referenceroleassignmentannotation.md)
- Kind: `Properties`
- Members: `2`

Declares that any compute resource referencing the annotated resource should be granted [ReferenceRoleAssignmentAnnotation.Roles](/reference/api/csharp/aspire.hosting.azure/referenceroleassignmentannotation/properties.md#roles) on the Azure resource [ReferenceRoleAssignmentAnnotation.Target](/reference/api/csharp/aspire.hosting.azure/referenceroleassignmentannotation/properties.md#target).

<a id="roles"></a>

## Roles

- Name: `Roles`
- Modifiers: `get`
- Returns: [IReadOnlySet<RoleDefinition>](/reference/api/csharp/aspire.hosting.azure/roledefinition.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/69db530a4816698cf1d5fa4557933e0ac4f127c6/src/Aspire.Hosting.Azure/ReferenceRoleAssignmentAnnotation.cs#L42)

Gets the set of roles that resources referencing the annotated resource should be assigned on [ReferenceRoleAssignmentAnnotation.Target](/reference/api/csharp/aspire.hosting.azure/referenceroleassignmentannotation/properties.md#target).

```csharp
public IReadOnlySet<RoleDefinition> Roles { get; }
```

<a id="target"></a>

## Target

- Name: `Target`
- Modifiers: `get`
- Returns: [AzureProvisioningResource](/reference/api/csharp/aspire.hosting.azure/azureprovisioningresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/69db530a4816698cf1d5fa4557933e0ac4f127c6/src/Aspire.Hosting.Azure/ReferenceRoleAssignmentAnnotation.cs#L37)

Gets the Azure resource that resources referencing the annotated resource should be granted roles on.

```csharp
public AzureProvisioningResource Target { get; }
```
