> ## Documentation Index
> Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Role Bindings

> Manage role bindings with the AX CLI

<Note>
  The `ax role-bindings` commands are currently in **BETA**. The API may change without notice. A one-time warning is emitted on first use.
</Note>

The `ax role-bindings` commands let you create, retrieve, update, and delete role bindings on the Arize platform. A role binding assigns a role to a user on a specific resource. Only one binding per user per resource is allowed.

## `ax role-bindings list`

List role bindings for the authenticated user's account. `--resource-type` is required.

```bash theme={null}
ax role-bindings list --resource-type <type> [--user-id <id>] [--limit <n>] [--cursor <cursor>]
```

| Option            | Description                                                         |
| ----------------- | ------------------------------------------------------------------- |
| `--resource-type` | Resource type to list bindings for: `SPACE` or `PROJECT` (required) |
| `--user-id`       | Filter by user ID (global ID)                                       |
| `--limit`         | Maximum number of results to return (default: 100)                  |
| `--cursor`        | Pagination cursor for the next page                                 |

**Examples:**

```bash theme={null}
ax role-bindings list --resource-type PROJECT
ax role-bindings list --resource-type SPACE --user-id usr_abc123
```

## `ax role-bindings create`

Create a new role binding. Assigns a role to a user on the specified resource. If a binding already exists for the user on the resource, the command exits without error.

```bash theme={null}
ax role-bindings create --user-id <id> --role-id <id> --resource-type <type> --resource-id <id>
```

| Option            | Description                                   |
| ----------------- | --------------------------------------------- |
| `--user-id`       | Global ID of the user to bind the role to     |
| `--role-id`       | Global ID of the role to assign               |
| `--resource-type` | Resource type to bind the role on             |
| `--resource-id`   | Global ID of the resource to bind the role on |

**Example:**

```bash theme={null}
ax role-bindings create \
  --user-id usr_abc123 \
  --role-id role_xyz789 \
  --resource-type PROJECT \
  --resource-id proj_abc123
```

## `ax role-bindings get`

Get a role binding by ID.

```bash theme={null}
ax role-bindings get <binding-id>
```

**Example:**

```bash theme={null}
ax role-bindings get rb_abc123
```

## `ax role-bindings update`

Update a role binding by replacing its assigned role.

```bash theme={null}
ax role-bindings update <binding-id> --role-id <id>
```

| Option      | Description           |
| ----------- | --------------------- |
| `--role-id` | New role ID to assign |

**Example:**

```bash theme={null}
ax role-bindings update rb_abc123 --role-id role_new789
```

## `ax role-bindings delete`

Delete a role binding by ID. This operation is irreversible.

```bash theme={null}
ax role-bindings delete <binding-id> [--force]
```

| Option    | Description                  |
| --------- | ---------------------------- |
| `--force` | Skip the confirmation prompt |

**Examples:**

```bash theme={null}
ax role-bindings delete rb_abc123
ax role-bindings delete rb_abc123 --force
```
