# DefaultRoleAssignmentsAnnotation

- Kind: `class`
- Package: [Aspire.Hosting.Azure](/reference/api/csharp/aspire.hosting.azure.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure/DefaultRoleAssignmentsAnnotation.cs)
- Implements: `IResourceAnnotation`

Specifies the default role assignments to be applied to an Azure resource when no specific role assignments (i.e., [RoleAssignmentAnnotation](/reference/api/csharp/aspire.hosting.azure/roleassignmentannotation.md)) are provided.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class DefaultRoleAssignmentsAnnotation
    : Aspire.Hosting.ApplicationModel.IResourceAnnotation
{
    // ...
}
```

## Constructors

- [DefaultRoleAssignmentsAnnotation(IReadOnlySet<RoleDefinition>)](/reference/api/csharp/aspire.hosting.azure/defaultroleassignmentsannotation/constructors.md#constructor-ireadonlyset-roledefinition) -- Specifies the default role assignments to be applied to an Azure resource when no specific role assignments (i.e., [RoleAssignmentAnnotation](/reference/api/csharp/aspire.hosting.azure/roleassignmentannotation.md)) are provided.

## Properties

- [Roles](/reference/api/csharp/aspire.hosting.azure/defaultroleassignmentsannotation/properties.md#roles) : [IReadOnlySet<RoleDefinition>](/reference/api/csharp/aspire.hosting.azure/roledefinition.md) `get` -- Gets the set of roles to use by default for an Azure resource.
