listUsers
Given a user pool ID, returns a list of users and their basic details in a user pool.
Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.
Learn more
Samples
fun main() {
//sampleStart
// This request submits a value for all possible parameters for ListUsers. By iterating the
// PaginationToken, you can page through and collect all users in a user pool.
val resp = cognitoIdentityProviderClient.listUsers {
attributesToGet = listOf<String>(
"email",
"sub"
)
filter = "\"email\"^=\"testuser\""
limit = 3
paginationToken = "abcd1234EXAMPLE"
userPoolId = "us-east-1_EXAMPLE"
}
//sampleEnd
}