# RoleBinding Properties

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [RoleBinding](/reference/api/csharp/aspire.hosting.kubernetes/rolebinding.md)
- Kind: `Properties`
- Members: `2`

Represents a Kubernetes RoleBinding resource, binding a Role or ClusterRole to a set of subjects (users, groups, or service accounts).

## RoleRef

- Name: `RoleRef`
- Modifiers: `get; set`
- Returns: [RoleRefV1](/reference/api/csharp/aspire.hosting.kubernetes/rolerefv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/RoleBindingV1.cs)

Gets or sets the reference to the role or cluster role that the binding applies to.

```csharp
public RoleRefV1 RoleRef { get; set; }
```

## Remarks

The RoleRef property specifies the target role or cluster role the RoleBinding object binds to. It contains information about the API group, the kind of the role (Role or ClusterRole), and the name of the role.

## Subjects

- Name: `Subjects`
- Modifiers: `get`
- Returns: [List<SubjectV1>](/reference/api/csharp/aspire.hosting.kubernetes/subjectv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/RoleBindingV1.cs#L40)

Represents a collection of Subjects that define the identities (users, groups, or service accounts) bound to a specific Role or ClusterRole in Kubernetes.

```csharp
public List<SubjectV1> Subjects { get; }
```

## Remarks

Each item in the Subjects list specifies an entity (such as a user, group, or service account) that is granted permissions associated with the referenced Role or ClusterRole. This property is a key component of a RoleBinding or ClusterRoleBinding resource.
