Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
remove role as a param
Browse files Browse the repository at this point in the history
  • Loading branch information
srinandan committed Aug 7, 2021
1 parent ef47922 commit 43ca118
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmd/env/removerole.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,21 @@ var RemoveRoleCmd = &cobra.Command{
return apiclient.SetApigeeOrg(org)
},
RunE: func(cmd *cobra.Command, args []string) (err error) {
err = environments.RemoveIAM(memberName, role, memberType)
err = environments.RemoveIAM(memberName, role)
if err != nil {
return err
}
fmt.Printf("Member %s (type = %s) removed access to role %s\n", memberName, memberType, role)
fmt.Printf("Member %s removed access to role %s\n", memberName, role)
return nil
},
}

func init() {

RemoveRoleCmd.Flags().StringVarP(&memberName, "name", "n",
"", "Service Account Name")
"", "Member name. Prefix the member role as role:name. Ex: user:[email protected]")
RemoveRoleCmd.Flags().StringVarP(&role, "role", "r",
"", "IAM Role")
RemoveRoleCmd.Flags().StringVarP(&memberType, "memberType", "m",
"serviceAccount", "memberType must be serviceAccount, user or group")

_ = RemoveRoleCmd.MarkFlagRequired("name")
_ = RemoveRoleCmd.MarkFlagRequired("role")
Expand Down

0 comments on commit 43ca118

Please sign in to comment.