amazonka-cognito-idp-2.0: Amazon Cognito Identity Provider SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.CognitoIdentityProvider.ListUsers

Description

Lists the users in the Amazon Cognito user pool.

This operation returns paginated results.

Synopsis

Creating a Request

data ListUsers Source #

Represents the request to list users.

See: newListUsers smart constructor.

Constructors

ListUsers' 

Fields

  • attributesToGet :: Maybe [Text]

    An array of strings, where each string is the name of a user attribute to be returned for each user in the search results. If the array is null, all attributes are returned.

  • filter' :: Maybe Text

    A filter string of the form "AttributeName Filter-Type "AttributeValue"". Quotation marks within the filter string must be escaped using the backslash (\) character. For example, "family_name = \"Reddy\"".

    • AttributeName: The name of the attribute to search for. You can only search for one attribute at a time.
    • Filter-Type: For an exact match, use =, for example, "given_name = \"Jon\"". For a prefix ("starts with") match, use ^=, for example, "given_name ^= \"Jon\"".
    • AttributeValue: The attribute value that must be matched for each user.

    If the filter string is empty, ListUsers returns all users in the user pool.

    You can only search for the following standard attributes:

    • username (case-sensitive)
    • email
    • phone_number
    • name
    • given_name
    • family_name
    • preferred_username
    • cognito:user_status (called Status in the Console) (case-insensitive)
    • status (called Enabled in the Console) (case-sensitive)
    • sub

    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 --query parameter of the list-users action in the CLI. When you use a client-side filter, ListUsers returns a paginated list of zero or more users. You can receive multiple pages in a row with zero results. Repeat the query with each pagination token that is returned until you receive a null pagination token value, and then review the combined result.

    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 :: Maybe Natural

    Maximum number of users to be returned.

  • paginationToken :: Maybe Text

    An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

  • userPoolId :: Text

    The user pool ID for the user pool on which the search should be performed.

Instances

Instances details
ToJSON ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

ToHeaders ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

Methods

toHeaders :: ListUsers -> [Header] #

ToPath ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

ToQuery ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

AWSPager ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

AWSRequest ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

Associated Types

type AWSResponse ListUsers #

Generic ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

Associated Types

type Rep ListUsers :: Type -> Type #

Read ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

Show ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

NFData ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

Methods

rnf :: ListUsers -> () #

Eq ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

Hashable ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

type AWSResponse ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

type Rep ListUsers Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

type Rep ListUsers = D1 ('MetaData "ListUsers" "Amazonka.CognitoIdentityProvider.ListUsers" "amazonka-cognito-idp-2.0-D1ERgMvEVPG9z8cOLXdU2" 'False) (C1 ('MetaCons "ListUsers'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "attributesToGet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "filter'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: (S1 ('MetaSel ('Just "paginationToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "userPoolId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newListUsers Source #

Arguments

:: Text

ListUsers

-> ListUsers 

Create a value of ListUsers with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:attributesToGet:ListUsers', listUsers_attributesToGet - An array of strings, where each string is the name of a user attribute to be returned for each user in the search results. If the array is null, all attributes are returned.

$sel:filter':ListUsers', listUsers_filter - A filter string of the form "AttributeName Filter-Type "AttributeValue"". Quotation marks within the filter string must be escaped using the backslash (\) character. For example, "family_name = \"Reddy\"".

  • AttributeName: The name of the attribute to search for. You can only search for one attribute at a time.
  • Filter-Type: For an exact match, use =, for example, "given_name = \"Jon\"". For a prefix ("starts with") match, use ^=, for example, "given_name ^= \"Jon\"".
  • AttributeValue: The attribute value that must be matched for each user.

If the filter string is empty, ListUsers returns all users in the user pool.

You can only search for the following standard attributes:

  • username (case-sensitive)
  • email
  • phone_number
  • name
  • given_name
  • family_name
  • preferred_username
  • cognito:user_status (called Status in the Console) (case-insensitive)
  • status (called Enabled in the Console) (case-sensitive)
  • sub

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 --query parameter of the list-users action in the CLI. When you use a client-side filter, ListUsers returns a paginated list of zero or more users. You can receive multiple pages in a row with zero results. Repeat the query with each pagination token that is returned until you receive a null pagination token value, and then review the combined result.

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.

$sel:limit:ListUsers', listUsers_limit - Maximum number of users to be returned.

ListUsers, listUsers_paginationToken - An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

ListUsers, listUsers_userPoolId - The user pool ID for the user pool on which the search should be performed.

Request Lenses

listUsers_attributesToGet :: Lens' ListUsers (Maybe [Text]) Source #

An array of strings, where each string is the name of a user attribute to be returned for each user in the search results. If the array is null, all attributes are returned.

listUsers_filter :: Lens' ListUsers (Maybe Text) Source #

A filter string of the form "AttributeName Filter-Type "AttributeValue"". Quotation marks within the filter string must be escaped using the backslash (\) character. For example, "family_name = \"Reddy\"".

  • AttributeName: The name of the attribute to search for. You can only search for one attribute at a time.
  • Filter-Type: For an exact match, use =, for example, "given_name = \"Jon\"". For a prefix ("starts with") match, use ^=, for example, "given_name ^= \"Jon\"".
  • AttributeValue: The attribute value that must be matched for each user.

If the filter string is empty, ListUsers returns all users in the user pool.

You can only search for the following standard attributes:

  • username (case-sensitive)
  • email
  • phone_number
  • name
  • given_name
  • family_name
  • preferred_username
  • cognito:user_status (called Status in the Console) (case-insensitive)
  • status (called Enabled in the Console) (case-sensitive)
  • sub

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 --query parameter of the list-users action in the CLI. When you use a client-side filter, ListUsers returns a paginated list of zero or more users. You can receive multiple pages in a row with zero results. Repeat the query with each pagination token that is returned until you receive a null pagination token value, and then review the combined result.

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.

listUsers_limit :: Lens' ListUsers (Maybe Natural) Source #

Maximum number of users to be returned.

listUsers_paginationToken :: Lens' ListUsers (Maybe Text) Source #

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

listUsers_userPoolId :: Lens' ListUsers Text Source #

The user pool ID for the user pool on which the search should be performed.

Destructuring the Response

data ListUsersResponse Source #

The response from the request to list users.

See: newListUsersResponse smart constructor.

Constructors

ListUsersResponse' 

Fields

  • paginationToken :: Maybe Text

    An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

  • users :: Maybe [UserType]

    The users returned in the request to list users.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic ListUsersResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

Associated Types

type Rep ListUsersResponse :: Type -> Type #

Show ListUsersResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

NFData ListUsersResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

Methods

rnf :: ListUsersResponse -> () #

Eq ListUsersResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

type Rep ListUsersResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.ListUsers

type Rep ListUsersResponse = D1 ('MetaData "ListUsersResponse" "Amazonka.CognitoIdentityProvider.ListUsers" "amazonka-cognito-idp-2.0-D1ERgMvEVPG9z8cOLXdU2" 'False) (C1 ('MetaCons "ListUsersResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "paginationToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "users") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [UserType])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newListUsersResponse Source #

Create a value of ListUsersResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

ListUsers, listUsersResponse_paginationToken - An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

$sel:users:ListUsersResponse', listUsersResponse_users - The users returned in the request to list users.

$sel:httpStatus:ListUsersResponse', listUsersResponse_httpStatus - The response's http status code.

Response Lenses

listUsersResponse_paginationToken :: Lens' ListUsersResponse (Maybe Text) Source #

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

listUsersResponse_users :: Lens' ListUsersResponse (Maybe [UserType]) Source #

The users returned in the request to list users.

listUsersResponse_httpStatus :: Lens' ListUsersResponse Int Source #

The response's http status code.