# IAM.ROLE.INFO

> Show what a role allows, the keys it reaches, and how many users have it.

URL: https://docs.hotkv.com/commands/iam-role-info/

```
IAM.ROLE.INFO name
```

- Group: IAM
- Complexity: O(N) where N is the number of users with a role
- HotKV Cloud: not available
- On-Premise: requires the enterprise-iam license feature

`IAM.ROLE.INFO` shows a role as it was made, in the form
[IAM.ROLE.CREATE](https://docs.hotkv.com/commands/iam-role-create/index.md) takes it.

## Return value

A null reply if there is no such role. Otherwise a flat array of 12 elements,
six names and their values, in RESP2 and RESP3:

| Name | Value |
| --- | --- |
| `name` | The role's name |
| `permissions` | What it allows, separated by commas: `@category` entries, then commands, then what it never allows with a `-` |
| `key_prefixes` | The keys it reaches, separated by commas; `*` for all |
| `ip_allowlist` | The networks a login must come from, separated by commas; empty for anywhere |
| `rate_limit` | Commands per second as an integer; `0` for no limit |
| `users` | How many users, `ldap:` or `oidc:` names and groups have the role, as an integer |

Without a license that includes `enterprise-iam` the reply is the error
`NOLICENSE enterprise-iam requires a HotKV license. Contact sales@hotkv.com`.

## Examples

```
127.0.0.1:6379> IAM.ROLE.INFO reporting
 1) "name"
 2) "reporting"
 3) "permissions"
 4) "get,mget,scan"
 5) "key_prefixes"
 6) "report:,shared:*"
 7) "ip_allowlist"
 8) ""
 9) "rate_limit"
10) (integer) 500
11) "users"
12) (integer) 0
127.0.0.1:6379> IAM.ROLE.INFO readonly
 1) "name"
 2) "readonly"
 3) "permissions"
 4) "@read,@connection,-@admin"
 5) "key_prefixes"
 6) "*"
 7) "ip_allowlist"
 8) ""
 9) "rate_limit"
10) (integer) 0
11) "users"
12) (integer) 0
127.0.0.1:6379> IAM.ROLE.INFO nosuch
(nil)
```

## Compatibility

HotKV-only command.

## See also

[IAM.ROLE.LIST](https://docs.hotkv.com/commands/iam-role-list/index.md), [IAM.ROLE.CREATE](https://docs.hotkv.com/commands/iam-role-create/index.md),
[IAM.USER.LIST](https://docs.hotkv.com/commands/iam-user-list/index.md)