Logout Multiple Users - Amazon Chime

Logout Multiple Users

The following example shows how to log out multiple users from your Amazon Chime administrative account.

ListUsersRequest listUsersRequest = new ListUsersRequest() .withAccountId("chimeAccountId"); ListUsersResult listUsersResult = chime.listUsers(listUsersRequest); for (User user: listUsersResult.getUsers()) { LogoutUserRequest logoutUserRequest = new LogoutUserRequest() .withAccountId(user.getAccountId()) .withUserId(user.getUserId()); chime.logoutUser(logoutUserRequest); }