示例#1
0
func (i *IAM) ListUsers(cli *iam.IAM) {
	req := &iam.ListUsersInput{}
	resp, err := cli.ListUsers(req)
	raiseError(err)

	if len(resp.Users) < 1 {
		fmt.Println("not found")
		return
	}

	for i := 0; i < len(resp.Users); i++ {
		fmt.Printf("User[%s] %s\n",
			*resp.Users[i].UserId,
			*resp.Users[i].UserName,
		)
	}
}