예제 #1
0
func (g *Group) ListGroupPolicies(cli *iam.IAM, groupName string) {
	// list-group-policies
	req := &iam.ListGroupPoliciesInput{GroupName: aws.String(groupName)}
	resp, err := cli.ListGroupPolicies(req)
	raiseError(err)

	if len(resp.PolicyNames) < 1 {
		fmt.Println("no policies")
		return
	}

	for i := 0; i < len(resp.PolicyNames); i++ {
		g.GetGroupPolicy(cli, groupName, *resp.PolicyNames[i])
	}
}