This repository has been archived by the owner on May 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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") | ||
|