mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-23 14:30:46 +02:00
docs: update shell examples to show JSON output format
1 parent
18a3338dbd
commit
dfe109c903
1 file changed
+5
-10
+5
-10
@@ -243,22 +243,17 @@ The shell provides a set of composable commands for managing S3 users, policies,
|
||||
```
|
||||
> s3.policy -put -name=photos-rw -file=photos-policy.json
|
||||
> s3.user.create -name alice
|
||||
Created user "alice"
|
||||
Access Key: AKID...
|
||||
Secret Key: ...
|
||||
|
||||
{"name":"alice","access_key":"AKID..."}
|
||||
> s3.policy.attach -policy photos-rw -user alice
|
||||
Attached policy "photos-rw" to user "alice"
|
||||
{"policy":"photos-rw","user":"alice"}
|
||||
```
|
||||
|
||||
The secret key is printed to stderr only (not in the JSON output).
|
||||
|
||||
Or use the one-step convenience command:
|
||||
```
|
||||
> s3.user.provision -name alice -bucket photos -role readwrite
|
||||
Created policy "photos-alice-readwrite"
|
||||
Created user "alice" with policy "photos-alice-readwrite" attached
|
||||
|
||||
Access Key: AKID...
|
||||
Secret Key: ...
|
||||
{"name":"alice","access_key":"AKID...","policy":"photos-alice-readwrite"}
|
||||
```
|
||||
|
||||
Roles: `readonly`, `readwrite`, `admin`. The bucket must be a literal name (no wildcards).
|
||||
|
||||
Reference in new issue
Block a user