跳至內容

IAM - Java SDK 2 method for listing users in a specified group

0

What is the Java SDK v2 method for getting a list of all the users attached to a specified IAM group?

I see there is a method listGroupsForUser which lists all the attached groups for a specified user. However I can't seem to find a method like ListUsersForGroup which goes the other way, i.e., get a list of users that are attached to a specified Group.

These are my SDK-related maven entries:

<groupId>software.amazon.awssdk</groupId> <artifactId>bom</artifactId> <version>2.17.86</version>

and

<groupId>software.amazon.awssdk</groupId> <artifactId>iam</artifactId> <version>2.17.53</version>

已提問 2 年前檢視次數 285 次

2 個答案
0

I do have my own solution. Sorry I forgot to mention it.

But I was wondering if this actually exists in the SDK (I think it should) and I am somehow missing it.

P.S What I want and cannot find is a method for the list of users for a specified group. I do find a method for listing all groups for a specified user which is iamClient.listGroupsForUser().

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。