AWS SDK Version 4 for .NET
API Reference

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.

The response from the request to list users.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.CognitoIdentityProvider.Model.ListUsersResponse

Namespace: Amazon.CognitoIdentityProvider.Model
Assembly: AWSSDK.CognitoIdentityProvider.dll
Version: 3.x.y.z

Syntax

C#
public class ListUsersResponse : AmazonWebServiceResponse

The ListUsersResponse type exposes the following members

Constructors

NameDescription
Public Method ListUsersResponse()

Properties

NameTypeDescription
Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property PaginationToken System.String

Gets and sets the property PaginationToken.

The identifier that Amazon Cognito returned with the previous request to this operation. When you include a pagination token in your request, Amazon Cognito returns the next set of items in the list. By use of this token, you can paginate through the full list of items.

Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property Users System.Collections.Generic.List<Amazon.CognitoIdentityProvider.Model.UserType>

Gets and sets the property Users.

An array of user pool users who match your query, and their attributes.

Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.

Examples

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.

A ListUsers request for the next 3 users whose email address starts with "testuser."


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;

            

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer