# RoleDefinition

- Kind: `struct`
- 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/RoleDefinition.cs)
- Implements: `IEquatable<RoleDefinition>`

Represents a role definition within an Azure resource.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public sealed struct RoleDefinition
    : System.IEquatable<Aspire.Hosting.Azure.RoleDefinition>
{
    // ...
}
```

## Constructors

- [RoleDefinition(string, string)](/reference/api/csharp/aspire.hosting.azure/roledefinition/constructors.md#constructor-string-string) -- Represents a role definition within an Azure resource.

## Properties

- [Id](/reference/api/csharp/aspire.hosting.azure/roledefinition/properties.md#id) : `string` `get; set` -- The unique identifier for the role definition.
- [Name](/reference/api/csharp/aspire.hosting.azure/roledefinition/properties.md#name) : `string` `get; set` -- The name of the role definition.

## Methods

- [Deconstruct(string, string)](/reference/api/csharp/aspire.hosting.azure/roledefinition/methods.md#deconstruct-string-string)
- [Equals(object)](/reference/api/csharp/aspire.hosting.azure/roledefinition/methods.md#equals-object) : `bool` -- Indicates whether this instance and a specified object are equal.
- [Equals(RoleDefinition)](/reference/api/csharp/aspire.hosting.azure/roledefinition/methods.md#equals-roledefinition) : `bool` -- Indicates whether the current object is equal to another object of the same type.
- [GetHashCode](/reference/api/csharp/aspire.hosting.azure/roledefinition/methods.md#gethashcode) : `int` -- Returns the hash code for this instance.
- [op_Equality(RoleDefinition, RoleDefinition)](/reference/api/csharp/aspire.hosting.azure/roledefinition/methods.md#op-equality-roledefinition-roledefinition) : `bool` `static`
- [op_Inequality(RoleDefinition, RoleDefinition)](/reference/api/csharp/aspire.hosting.azure/roledefinition/methods.md#op-inequality-roledefinition-roledefinition) : `bool` `static`
- [ToString](/reference/api/csharp/aspire.hosting.azure/roledefinition/methods.md#tostring) : `string` -- Returns the fully qualified type name of this instance.
