Skip to content

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>

asked 2 years ago276 views

2 Answers
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().

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.