Skip to content

Commit a69451e

Browse files
committed
Phase 2 - server group commands
1 parent 2a08639 commit a69451e

34 files changed

Lines changed: 479 additions & 130 deletions

content/commands/acl-cat.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ Then we may want to know what commands are part of a given category:
119119
31) "sort"
120120
```
121121

122+
## Optional arguments
123+
124+
<details open><summary><code>category</code></summary>
125+
126+
List only the commands in the given ACL category. If omitted, all categories are listed.
127+
128+
</details>
129+
122130
## Redis Software and Redis Cloud compatibility
123131

124132
| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |

content/commands/acl-deluser.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ removed from the system, this is the default user that every new connection
4444
is authenticated with. The list of users may include usernames that do not
4545
exist, in such case no operation is performed for the non existing users.
4646

47+
## Required arguments
48+
49+
<details open><summary><code>username [username ...]</code></summary>
50+
51+
One or more usernames to delete.
52+
53+
</details>
54+
4755
## Examples
4856

4957
```

content/commands/acl-dryrun.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,28 @@ title: ACL DRYRUN
4646
Simulate the execution of a given command by a given user.
4747
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.
4848

49+
## Required arguments
50+
51+
<details open><summary><code>username</code></summary>
52+
53+
The user to run the simulated command as.
54+
55+
</details>
56+
57+
<details open><summary><code>command</code></summary>
58+
59+
The command to test.
60+
61+
</details>
62+
63+
## Optional arguments
64+
65+
<details open><summary><code>arg [arg ...]</code></summary>
66+
67+
The arguments to pass to the tested command.
68+
69+
</details>
70+
4971
## Examples
5072

5173
```

content/commands/acl-genpass.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,18 @@ The command output is a hexadecimal representation of a binary string.
5757
By default it emits 256 bits (so 64 hex characters). The user can provide
5858
an argument in form of number of bits to emit from 1 to 1024 to change
5959
the output length. Note that the number of bits provided is always
60-
rounded to the next multiple of 4. So for instance asking for just 1
60+
rounded to the next multiple of 4. So for instance asking for just a 1
6161
bit password will result in 4 bits to be emitted, in the form of a single
6262
hex character.
6363

64+
## Optional arguments
65+
66+
<details open><summary><code>bits</code></summary>
67+
68+
The amount of entropy, in bits, for the generated password. Defaults to 256.
69+
70+
</details>
71+
6472
## Examples
6573

6674
```

content/commands/acl-getuser.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ Note: This description of command rules reflects the user's effective permission
5252

5353
Selectors are listed in the order they were applied to the user, and include information about commands, key patterns, and channel patterns.
5454

55+
## Required arguments
56+
57+
<details open><summary><code>username</code></summary>
58+
59+
The user whose rules to return.
60+
61+
</details>
62+
5563
## Examples
5664

5765
Here's an example configuration for a user

content/commands/acl-log.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ The optional argument specifies how many entries to show. By default
5757
up to ten failures are returned. The special [`RESET`]({{< relref "/commands/reset" >}}) argument clears the log.
5858
Entries are displayed starting from the most recent.
5959

60+
## Optional arguments
61+
62+
<details open><summary><code>count | RESET</code></summary>
63+
64+
The number of recent entries to return, or `RESET` to clear the log.
65+
66+
</details>
67+
6068
## Examples
6169

6270
```
@@ -85,6 +93,8 @@ Entries are displayed starting from the most recent.
8593
20) (integer) 1675361492408
8694
```
8795

96+
## Details
97+
8898
Each log entry is composed of the following fields:
8999

90100
1. `count`: The number of security events detected within a 60 second period that are represented by this entry.

content/commands/acl-setuser.md

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,39 @@ For information on persisting ACLs, see the [ACL tutorial]({{< relref "/operate/
9898

9999
The following documentation is a reference manual about the capabilities of this command, however our [ACL tutorial]({{< relref "/operate/oss_and_stack/management/security/acl" >}}) may be a more gentle introduction to how the ACL system works in general.
100100

101-
## ACL rules
101+
## Required arguments
102+
103+
<details open><summary><code>username</code></summary>
104+
105+
The user to create or modify.
106+
107+
</details>
108+
109+
## Optional arguments
110+
111+
<details open><summary><code>rule [rule ...]</code></summary>
112+
113+
One or more ACL rules to apply to the user. See the [ACL rules](#acl-rules) section for the full list of rules.
114+
115+
</details>
116+
117+
## Examples
118+
119+
```
120+
> ACL SETUSER alan allkeys +@string +@set -SADD >alanpassword
121+
+OK
122+
> ACL SETUSER antirez heeyyyy
123+
(error) ERR Error in ACL SETUSER modifier 'heeyyyy': Syntax error
124+
```
125+
126+
## Details
127+
128+
### ACL rules
102129

103130
Redis ACL rules are split into two categories: rules that define command permissions or _command rules_, and rules that define the user state or _user management rules_.
104131
This is a list of all the supported Redis ACL rules:
105132

106-
### Command rules
133+
#### Command rules
107134

108135
* `~<pattern>`: Adds the specified key pattern (glob style pattern, like in the [`KEYS`]({{< relref "/commands/keys" >}}) command), to the list of key patterns accessible by the user. This grants both read and write permissions to keys that match the pattern. You can add multiple key patterns to the same user. Example: `~objects:*`
109136
* `%R~<pattern>`: (Available in Redis 7.0 and later) Adds the specified read key pattern. This behaves similar to the regular key pattern but only grants permission to read from keys that match the given pattern. See [key permissions]({{< relref "/operate/oss_and_stack/management/security/acl#key-permissions" >}}) for more information.
@@ -122,7 +149,7 @@ This is a list of all the supported Redis ACL rules:
122149
* `-@<category>`: Like `+@<category>` but removes all the commands in the category instead of adding them.
123150
* `nocommands`: Alias for `-@all`. Removes all the commands, and the user is no longer able to execute anything.
124151

125-
### User management rules
152+
#### User management rules
126153

127154
* `on`: Set the user as active, it will be possible to authenticate as this user using `AUTH <username> <password>`.
128155
* `off`: Set user as not active, it will be impossible to log as this user. Please note that if a user gets disabled (set to off) after there are connections already authenticated with such a user, the connections will continue to work as expected. To also kill the old connections you can use [`CLIENT KILL`]({{< relref "/commands/client-kill" >}}) with the user option. An alternative is to delete the user with [`ACL DELUSER`]({{< relref "/commands/acl-deluser" >}}), that will result in all the connections authenticated as the deleted user to be disconnected.
@@ -135,16 +162,6 @@ This is a list of all the supported Redis ACL rules:
135162
* `clearselectors`: (Available in Redis 7.0 and later) Deletes all of the selectors attached to the user.
136163
* `reset`: Removes any capability from the user. They are set to off, without passwords, unable to execute any command, unable to access any key.
137164

138-
## Examples
139-
140-
```
141-
> ACL SETUSER alan allkeys +@string +@set -SADD >alanpassword
142-
+OK
143-
144-
> ACL SETUSER antirez heeyyyy
145-
(error) ERR Error in ACL SETUSER modifier 'heeyyyy': Syntax error
146-
```
147-
148165
## Redis Software and Redis Cloud compatibility
149166

150167
| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |

content/commands/bgsave.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ command.
5858

5959
See the [persistence documentation]({{< relref "/operate/oss_and_stack/management/persistence" >}}) for detailed information.
6060

61+
## Optional arguments
62+
63+
<details open><summary><code>SCHEDULE</code></summary>
64+
65+
Schedule the save to run after any in-progress `BGSAVE` finishes, instead of returning an error.
66+
67+
</details>
68+
6169
## Redis Software and Redis Cloud compatibility
6270

6371
| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |

content/commands/command-docs.md

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,29 +47,38 @@ The following keys may be included in the mapped reply:
4747
* **since:** the Redis version that added the command (or for module commands, the module version).
4848
* **group:** the functional group to which the command belongs.
4949
Possible values are:
50-
- _bitmap_
51-
- _cluster_
52-
- _connection_
53-
- _generic_
54-
- _geo_
55-
- _hash_
56-
- _hyperloglog_
57-
- _list_
58-
- _module_
59-
- _pubsub_
60-
- _scripting_
61-
- _sentinel_
62-
- _server_
63-
- _set_
64-
- _sorted-set_
65-
- _stream_
66-
- _string_
67-
- _transactions_
50+
- array
51+
- bf
52+
- bitmap
53+
- cf
54+
- cluster
55+
- cms
56+
- connection
57+
- generic
58+
- geo
59+
- hash
60+
- hyperloglog
61+
- json
62+
- list
63+
- pubsub
64+
- scripting
65+
- search
66+
- server
67+
- set
68+
- sorted-set
69+
- stream
70+
- string
71+
- suggestion
72+
- tdigest
73+
- timeseries
74+
- topk
75+
- transactions
76+
- vector_set
6877
* **complexity:** a short explanation about the command's time complexity.
6978
* **doc_flags:** an array of documentation flags.
7079
Possible values are:
71-
- _deprecated:_ the command is deprecated.
72-
- _syscmd:_ a system command that isn't meant to be called by users.
80+
- deprecated: the command is deprecated.
81+
- syscmd: a system command that isn't meant to be called by users.
7382
* **deprecated_since:** the Redis version that deprecated the command (or for module commands, the module version)..
7483
* **replaced_by:** the alternative for a deprecated command.
7584
* **history:** an array of historical notes describing changes to the command's output or arguments. It should not contain information about behavioral changes.
@@ -81,6 +90,14 @@ The following keys may be included in the mapped reply:
8190

8291
[td]: /develop/reference/command-arguments
8392

93+
## Optional arguments
94+
95+
<details open><summary><code>command-name [command-name ...]</code></summary>
96+
97+
One or more command names to return documentation for. If omitted, documentation for all commands is returned.
98+
99+
</details>
100+
84101
## Examples
85102

86103
{{% redis-cli %}}

content/commands/command-getkeys.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,28 @@ summary: Extracts the key names from an arbitrary command.
3636
syntax_fmt: COMMAND GETKEYS command [arg [arg ...]]
3737
title: COMMAND GETKEYS
3838
---
39-
Returns [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of keys from a full Redis command.
4039

4140
`COMMAND GETKEYS` is a helper command to let you find the keys
42-
from a full Redis command.
41+
from the provided Redis `command`.
4342

44-
[`COMMAND`]({{< relref "/commands/command" >}}) provides information on how to find the key names of each command (see `firstkey`, [key specifications]({{< relref "develop/reference/key-specs#logical-operation-flags" >}}), and `movablekeys`),
45-
but in some cases it's not possible to find keys of certain commands and then the entire command must be parsed to discover some / all key names.
46-
You can use `COMMAND GETKEYS` or [`COMMAND GETKEYSANDFLAGS`]({{< relref "/commands/command-getkeysandflags" >}}) to discover key names directly from how Redis parses the commands.
43+
44+
[`COMMAND`]({{< relref "/commands/command" >}}) describes how Redis identifies key names for each command, including `firstkey`, [key specifications]({{< relref "develop/reference/key-specs#logical-operation-flags" >}}), and `movablekeys`. For some commands, Redis can identify the keys only by parsing the full command. Use COMMAND GETKEYS or [`COMMAND GETKEYSANDFLAGS`]({{< relref "/commands/command-getkeysandflags" >}}) to get the key names directly from the Redis command parser.
45+
46+
## Required arguments
47+
48+
<details open><summary><code>command</code></summary>
49+
50+
The name of the command to analyze.
51+
52+
</details>
53+
54+
## Optional arguments
55+
56+
<details open><summary><code>arg [arg ...]</code></summary>
57+
58+
The arguments that would be passed to the command.
59+
60+
</details>
4761

4862
## Examples
4963

0 commit comments

Comments
 (0)