# OpcRolePermission Members

> Reference: Describes the operations a role is permitted to perform on a node, as stated by the RolePermissions and UserRolePermissions of the node (OPC 10000-3, RolePermissionType).

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcRolePermission</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

## Constructors

### OpcRolePermission

Initializes a new instance of the [OpcRolePermission](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcrolepermission/) class using the `roleId` and `permissions` specified.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcRolePermission(OpcNodeId roleId, OpcPermissions permissions)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub New(roleId As OpcNodeId, permissions As OpcPermissions)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `roleId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the role. |
| `permissions` | [OpcPermissions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcpermissions/) | The operations the role is permitted to perform. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `roleId` is a null reference (Nothing in Visual Basic). |

## Properties

### Permissions

Gets the operations the role is permitted to perform on the node.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcPermissions Permissions { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property Permissions As OpcPermissions
```

</div>

**Property value**

[OpcPermissions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcpermissions/)

A combination of the members defined by the [OpcPermissions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcpermissions/) enumeration.

### RoleId

Gets the identifier of the role.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcNodeId RoleId { get; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public ReadOnly Property RoleId As OpcNodeId
```

</div>

**Property value**

[OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/)

The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) of the node which represents the role.
