func (g *Group) ListGroup(cli *iam.IAM) { req := &iam.ListGroupsInput{} resp, err := cli.ListGroups(req) raiseError(err) if len(resp.Groups) < 1 { fmt.Println("groups not found") return } fmt.Println("GroupName, PolicyName, Statement") for i := 0; i < len(resp.Groups); i++ { g.ListGroupPolicies(cli, *resp.Groups[i].GroupName) } }
func (i *IAM) ListGroup(cli *iam.IAM) { req := &iam.ListGroupsInput{} resp, err := cli.ListGroups(req) raiseError(err) if len(resp.Groups) < 1 { fmt.Println("not found") return } for i := 0; i < len(resp.Groups); i++ { fmt.Printf("Group[%s]\n", *resp.Groups[i].GroupName, ) } }