ACL GETUSER to inspect the resulting permissions of a single ACL user, broken out into structured fields instead of the raw rule string that ACL LIST returns.
The reply describes the user’s on/off and other flags, its passwords, the commands it can call as a single space-separated permission string, the key patterns it can access, and the channel patterns it can publish to or subscribe on. A username that does not exist returns a null reply rather than an error, which makes this command a convenient way to check whether a user exists before creating or modifying it.
Syntax
Arguments
Important points
- Returns null when the given username does not exist, instead of an error.
- The reply has five fields:
flags,passwords,commands,keys, andchannels. Standard Redis 7+ also returns aselectorsfield; this deployment does not support selectors, so client libraries that expect one will simply receive an empty or undefined value for it.
Response
The reply reports the result of the operation. Error replies have the same shape in RESP2 and RESP3 and are surfaced as exceptions by the SDKs below.Client libraries often decode bulk strings, maps, sets, and numeric strings into language-native values. The table describes the Redis wire reply.
Examples
TCP examples use the TLSREDIS_URL from the Upstash console. REST examples use UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN.
Redis CLI
Redis CLI
@upstash/redis
@upstash/redis
This command is not supported yet in
@upstash/redis.upstash_redis
upstash_redis
This command is not supported yet in
upstash_redis.ioredis
ioredis
node-redis
node-redis
redis-py
redis-py
go-redis
go-redis
go-redis has no typed
ACLGetUser method; call ACL GETUSER through Do.jedis
jedis
redis-rs
redis-rs