listUsers

abstract suspend fun listUsers(input: ListUsersRequest = ListUsersRequest { }): ListUsersResponse

Lists the IAM users that have the specified path prefix. If no path prefix is specified, the operation returns all users in the Amazon Web Services account. If there are none, the operation returns an empty list.

IAM resource-listing operations return a subset of the available attributes for the resource. This operation does not return the following attributes, even though they are an attribute of the returned object:

  • PermissionsBoundary

  • Tags To view all of the information for a user, see GetUser.

You can paginate the results using the MaxItems and Marker parameters.

Samples


fun main() { 
   //sampleStart 
   // The following command lists the IAM users in the current account.
val resp = iamClient.listUsers() 
   //sampleEnd
}