File tree 1 file changed +36
-0
lines changed
internal/namespaces/iam/v1alpha1
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ func GetGeneratedCommands() *core.Commands {
35
35
iamSSHKeyDelete (),
36
36
iamUserList (),
37
37
iamUserGet (),
38
+ iamUserDelete (),
38
39
iamApplicationList (),
39
40
iamApplicationCreate (),
40
41
iamApplicationGet (),
@@ -478,6 +479,41 @@ func iamUserGet() *core.Command {
478
479
}
479
480
}
480
481
482
+ func iamUserDelete () * core.Command {
483
+ return & core.Command {
484
+ Short : `Delete a user` ,
485
+ Long : `Delete a user.` ,
486
+ Namespace : "iam" ,
487
+ Resource : "user" ,
488
+ Verb : "delete" ,
489
+ // Deprecated: false,
490
+ ArgsType : reflect .TypeOf (iam.DeleteUserRequest {}),
491
+ ArgSpecs : core.ArgSpecs {
492
+ {
493
+ Name : "user-id" ,
494
+ Short : `ID of user to delete` ,
495
+ Required : true ,
496
+ Deprecated : false ,
497
+ Positional : true ,
498
+ },
499
+ },
500
+ Run : func (ctx context.Context , args interface {}) (i interface {}, e error ) {
501
+ request := args .(* iam.DeleteUserRequest )
502
+
503
+ client := core .ExtractClient (ctx )
504
+ api := iam .NewAPI (client )
505
+ e = api .DeleteUser (request )
506
+ if e != nil {
507
+ return nil , e
508
+ }
509
+ return & core.SuccessResult {
510
+ Resource : "user" ,
511
+ Verb : "delete" ,
512
+ }, nil
513
+ },
514
+ }
515
+ }
516
+
481
517
func iamApplicationList () * core.Command {
482
518
return & core.Command {
483
519
Short : `List applications of an organization` ,
You can’t perform that action at this time.
0 commit comments