AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the ListUsers operation.
Lists 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
Namespace: Amazon.CognitoIdentityProvider.Model
Assembly: AWSSDK.CognitoIdentityProvider.dll
Version: 3.x.y.z
public class ListUsersRequest : AmazonCognitoIdentityProviderRequest IAmazonWebServiceRequest
The ListUsersRequest type exposes the following members
Name | Description | |
---|---|---|
ListUsersRequest() |
Name | Type | Description | |
---|---|---|---|
AttributesToGet | System.Collections.Generic.List<System.String> |
Gets and sets the property AttributesToGet.
A JSON array of user attribute names, for example
Use |
|
Filter | System.String |
Gets and sets the property Filter.
A filter string of the form
If the filter string is empty, You can only search for the following standard attributes:
Custom attributes aren't searchable.
You can also list users with a client-side filter. The server-side filter matches
no more than one attribute. For an advanced search, use a client-side filter with
the For more information about server-side and client-side filtering, see FilteringCLI output in the Command Line Interface User Guide. For more information, see Searching for Users Using the ListUsers API and Examples of Using the ListUsers API in the Amazon Cognito Developer Guide. |
|
Limit | System.Int32 |
Gets and sets the property Limit. Maximum number of users to be returned. |
|
PaginationToken | System.String |
Gets and sets the property PaginationToken. This API operation returns a limited number of results. The pagination token is an identifier that you can present in an additional API request with the same parameters. When you include the pagination token, Amazon Cognito returns the next set of items after the current list. Subsequent requests return a new pagination token. By use of this token, you can paginate through the full list of items. |
|
UserPoolId | System.String |
Gets and sets the property UserPoolId. The ID of the user pool on which the search should be performed. |
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.
var client = new AmazonCognitoIdentityProviderClient(); var response = client.ListUsers(new ListUsersRequest { AttributesToGet = new List<string> { "email", "sub" }, Filter = "\"email\"^=\"testuser\"", Limit = 3, PaginationToken = "abcd1234EXAMPLE", UserPoolId = "us-east-1_EXAMPLE" }); string paginationToken = response.PaginationToken; List<UserType> users = response.Users;
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5