File tree Expand file tree Collapse file tree 6 files changed +81
-3
lines changed
internal/namespaces/iam/v1alpha1 Expand file tree Collapse file tree 6 files changed +81
-3
lines changed Original file line number Diff line number Diff line change
1
+ 🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2
+ 🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3
+ Update the parameters of a user, including `tags`.
4
+
5
+ USAGE:
6
+ scw iam user update <user-id ...> [arg=value ...]
7
+
8
+ ARGS:
9
+ user-id ID of the user to update
10
+ [tags.{index}] New tags for the user (maximum of 10 tags)
11
+
12
+ FLAGS:
13
+ -h, --help help for update
14
+
15
+ GLOBAL FLAGS:
16
+ -c, --config string The path to the config file
17
+ -D, --debug Enable debug mode
18
+ -o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
19
+ -p, --profile string The config profile to use
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ AVAILABLE COMMANDS:
10
10
delete Delete a guest user from an Organization
11
11
get Get a given user
12
12
list List users of an Organization
13
+ update Update a user
13
14
14
15
FLAGS:
15
16
-h, --help help for user
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ IAM API.
55
55
- [ Delete a guest user from an Organization] ( #delete-a-guest-user-from-an-organization )
56
56
- [ Get a given user] ( #get-a-given-user )
57
57
- [ List users of an Organization] ( #list-users-of-an-organization )
58
+ - [ Update a user] ( #update-a-user )
58
59
59
60
60
61
## API keys management commands
@@ -1074,3 +1075,23 @@ scw iam user list [arg=value ...]
1074
1075
1075
1076
1076
1077
1078
+ ### Update a user
1079
+
1080
+ Update the parameters of a user, including ` tags ` .
1081
+
1082
+ ** Usage:**
1083
+
1084
+ ```
1085
+ scw iam user update <user-id ...> [arg=value ...]
1086
+ ```
1087
+
1088
+
1089
+ ** Args:**
1090
+
1091
+ | Name | | Description |
1092
+ | ------| ---| -------------|
1093
+ | user-id | Required | ID of the user to update |
1094
+ | tags.{index} | | New tags for the user (maximum of 10 tags) |
1095
+
1096
+
1097
+
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ require (
24
24
github.com/moby/buildkit v0.11.6
25
25
github.com/opencontainers/go-digest v1.0.0
26
26
github.com/pkg/errors v0.9.1
27
- github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22.0.20231229162831-8d1cd051858d
27
+ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22.0.20240103152155-b6170c7b5894
28
28
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
29
29
github.com/spf13/cobra v1.8.0
30
30
github.com/spf13/pflag v1.0.5
Original file line number Diff line number Diff line change @@ -386,8 +386,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN
386
386
github.com/russross/blackfriday/v2 v2.1.0 /go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM =
387
387
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI =
388
388
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 /go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs =
389
- github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22.0.20231229162831-8d1cd051858d h1:cbzT1T/CEsxu2SHFlewnIIUsJfV/vP65WNEPz0CAd1g =
390
- github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22.0.20231229162831-8d1cd051858d /go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg =
389
+ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22.0.20240103152155-b6170c7b5894 h1:k0sP67Yer2X9O+F1tK2THU4PVPNsbU3SHzhR80eaJvU =
390
+ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22.0.20240103152155-b6170c7b5894 /go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg =
391
391
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8 =
392
392
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE =
393
393
github.com/sergi/go-diff v1.0.0 /go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo =
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ func GetGeneratedCommands() *core.Commands {
37
37
iamSSHKeyDelete (),
38
38
iamUserList (),
39
39
iamUserGet (),
40
+ iamUserUpdate (),
40
41
iamUserDelete (),
41
42
iamUserCreate (),
42
43
iamApplicationList (),
@@ -524,6 +525,42 @@ func iamUserGet() *core.Command {
524
525
}
525
526
}
526
527
528
+ func iamUserUpdate () * core.Command {
529
+ return & core.Command {
530
+ Short : `Update a user` ,
531
+ Long : `Update the parameters of a user, including ` + "`" + `tags` + "`" + `.` ,
532
+ Namespace : "iam" ,
533
+ Resource : "user" ,
534
+ Verb : "update" ,
535
+ // Deprecated: false,
536
+ ArgsType : reflect .TypeOf (iam.UpdateUserRequest {}),
537
+ ArgSpecs : core.ArgSpecs {
538
+ {
539
+ Name : "user-id" ,
540
+ Short : `ID of the user to update` ,
541
+ Required : true ,
542
+ Deprecated : false ,
543
+ Positional : true ,
544
+ },
545
+ {
546
+ Name : "tags.{index}" ,
547
+ Short : `New tags for the user (maximum of 10 tags)` ,
548
+ Required : false ,
549
+ Deprecated : false ,
550
+ Positional : false ,
551
+ },
552
+ },
553
+ Run : func (ctx context.Context , args interface {}) (i interface {}, e error ) {
554
+ request := args .(* iam.UpdateUserRequest )
555
+
556
+ client := core .ExtractClient (ctx )
557
+ api := iam .NewAPI (client )
558
+ return api .UpdateUser (request )
559
+
560
+ },
561
+ }
562
+ }
563
+
527
564
func iamUserDelete () * core.Command {
528
565
return & core.Command {
529
566
Short : `Delete a guest user from an Organization` ,
You can’t perform that action at this time.
0 commit comments