What's new in Valkey 9.0? Discover new features and improvements. Read the announcement.

ACL DRYRUN

Simulates the execution of a command by a user, without executing the command.

Usage
ACL DRYRUN username command [arg ...]
Complexity
O(1).
Since
7.0.0
ACL Categories
@admin, @dangerous, @slow
Command flags
ADMIN, NOSCRIPT, LOADING, STALE, SENTINEL

Simulate the execution of a given command by a given user. This command can be used to test the permissions of a given user without having to enable the user or cause the side effects of running the command.

Examples

127.0.0.1:6379> ACL SETUSER VIRGINIA +SET ~*
"OK"
127.0.0.1:6379> ACL DRYRUN VIRGINIA SET foo bar
"OK"
127.0.0.1:6379> ACL DRYRUN VIRGINIA GET foo
"User VIRGINIA has no permissions to run the 'get' command"

Replies

RESP2

Any of the following:

RESP3

Any of the following: