@@ -45,6 +45,8 @@ func GetGeneratedCommands() *core.Commands {
4545 iamUserCreate (),
4646 iamUserUpdateUsername (),
4747 iamUserUpdatePassword (),
48+ iamUserLock (),
49+ iamUserUnlock (),
4850 iamApplicationList (),
4951 iamApplicationCreate (),
5052 iamApplicationGet (),
@@ -875,6 +877,64 @@ func iamUserUpdatePassword() *core.Command {
875877 }
876878}
877879
880+ func iamUserLock () * core.Command {
881+ return & core.Command {
882+ Short : `Lock a member` ,
883+ Long : `Lock a member. A locked member cannot log in or use API keys until the locked status is removed.` ,
884+ Namespace : "iam" ,
885+ Resource : "user" ,
886+ Verb : "lock" ,
887+ // Deprecated: false,
888+ ArgsType : reflect .TypeOf (iam.LockUserRequest {}),
889+ ArgSpecs : core.ArgSpecs {
890+ {
891+ Name : "user-id" ,
892+ Short : `ID of the user to lock` ,
893+ Required : true ,
894+ Deprecated : false ,
895+ Positional : true ,
896+ },
897+ },
898+ Run : func (ctx context.Context , args any ) (i any , e error ) {
899+ request := args .(* iam.LockUserRequest )
900+
901+ client := core .ExtractClient (ctx )
902+ api := iam .NewAPI (client )
903+
904+ return api .LockUser (request )
905+ },
906+ }
907+ }
908+
909+ func iamUserUnlock () * core.Command {
910+ return & core.Command {
911+ Short : `Unlock a member` ,
912+ Long : `Unlock a member.` ,
913+ Namespace : "iam" ,
914+ Resource : "user" ,
915+ Verb : "unlock" ,
916+ // Deprecated: false,
917+ ArgsType : reflect .TypeOf (iam.UnlockUserRequest {}),
918+ ArgSpecs : core.ArgSpecs {
919+ {
920+ Name : "user-id" ,
921+ Short : `ID of the user to unlock` ,
922+ Required : true ,
923+ Deprecated : false ,
924+ Positional : true ,
925+ },
926+ },
927+ Run : func (ctx context.Context , args any ) (i any , e error ) {
928+ request := args .(* iam.UnlockUserRequest )
929+
930+ client := core .ExtractClient (ctx )
931+ api := iam .NewAPI (client )
932+
933+ return api .UnlockUser (request )
934+ },
935+ }
936+ }
937+
878938func iamApplicationList () * core.Command {
879939 return & core.Command {
880940 Short : `List applications of an Organization` ,
0 commit comments