# Role Constructors

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [Role](/reference/api/csharp/aspire.hosting.kubernetes/role.md)
- Kind: `Constructors`
- Members: `1`

Defines a Kubernetes Role resource within the "rbac.authorization.k8s.io/v1" API group.

## Role

- Name: `Constructor`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/RoleV1.cs#L20-L32)

Defines a Kubernetes Role resource within the "rbac.authorization.k8s.io/v1" API group.

```csharp
public sealed class Role
{
    public Role()
    {
        // ...
    }
}
```

## Remarks

A Role is used to grant access to resources within a specific namespace in Kubernetes. It is composed of a collection of policy rules that determine the permitted actions (e.g., get, list, create) on specified resources within the namespace. This class extends the BaseKubernetesResource for consistent handling of Kubernetes resources.
