Search in sources :

Example 1 with ListUsersRequest

use of com.amazonaws.services.identitymanagement.model.ListUsersRequest in project aws-doc-sdk-examples by awsdocs.

the class ListUsers method main.

public static void main(String[] args) {
    final AmazonIdentityManagement iam = AmazonIdentityManagementClientBuilder.defaultClient();
    boolean done = false;
    while (!done) {
        ListUsersRequest request = new ListUsersRequest();
        ListUsersResult response = iam.listUsers(request);
        for (User user : response.getUsers()) {
            System.out.format("Retrieved user %s", user.getUserName());
        }
        request.setMarker(response.getMarker());
        if (!response.getIsTruncated()) {
            done = true;
        }
    }
}
Also used : ListUsersRequest(com.amazonaws.services.identitymanagement.model.ListUsersRequest) User(com.amazonaws.services.identitymanagement.model.User) AmazonIdentityManagement(com.amazonaws.services.identitymanagement.AmazonIdentityManagement) ListUsersResult(com.amazonaws.services.identitymanagement.model.ListUsersResult)

Aggregations

AmazonIdentityManagement (com.amazonaws.services.identitymanagement.AmazonIdentityManagement)1 ListUsersRequest (com.amazonaws.services.identitymanagement.model.ListUsersRequest)1 ListUsersResult (com.amazonaws.services.identitymanagement.model.ListUsersResult)1 User (com.amazonaws.services.identitymanagement.model.User)1