Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Lists the users in the Amazon Cognito user pool.
This operation returns paginated results.
Synopsis
- data ListUsers = ListUsers' {
- paginationToken :: Maybe Text
- attributesToGet :: Maybe [Text]
- limit :: Maybe Natural
- filter' :: Maybe Text
- userPoolId :: Text
- newListUsers :: Text -> ListUsers
- listUsers_paginationToken :: Lens' ListUsers (Maybe Text)
- listUsers_attributesToGet :: Lens' ListUsers (Maybe [Text])
- listUsers_limit :: Lens' ListUsers (Maybe Natural)
- listUsers_filter :: Lens' ListUsers (Maybe Text)
- listUsers_userPoolId :: Lens' ListUsers Text
- data ListUsersResponse = ListUsersResponse' {
- paginationToken :: Maybe Text
- users :: Maybe [UserType]
- httpStatus :: Int
- newListUsersResponse :: Int -> ListUsersResponse
- listUsersResponse_paginationToken :: Lens' ListUsersResponse (Maybe Text)
- listUsersResponse_users :: Lens' ListUsersResponse (Maybe [UserType])
- listUsersResponse_httpStatus :: Lens' ListUsersResponse Int
Creating a Request
Represents the request to list users.
See: newListUsers
smart constructor.
ListUsers' | |
|
Instances
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:paginationToken: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.
$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:limit:ListUsers'
, listUsers_limit
- Maximum number of users to be 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 are not searchable.
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:userPoolId:ListUsers'
, listUsers_userPoolId
- The user pool ID for the user pool on which the search should be
performed.
Request Lenses
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_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 are not searchable.
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_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.
ListUsersResponse' | |
|
Instances
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:
$sel:paginationToken: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.