public class ListUsersRequest
extends com.amazonaws.AmazonWebServiceRequest
implements java.io.Serializable
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
| Constructor and Description |
|---|
ListUsersRequest() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<java.lang.String> |
getAttributesToGet()
A JSON array of user attribute names, for example
given_name
, that you want Amazon Cognito to include in the response for each user. |
java.lang.String |
getFilter()
A filter string of the form
"AttributeName Filter-Type "AttributeValue"".
|
java.lang.Integer |
getLimit()
Maximum number of users to be returned.
|
java.lang.String |
getPaginationToken()
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.
|
java.lang.String |
getUserPoolId()
The user pool ID for the user pool on which the search should be
performed.
|
int |
hashCode() |
void |
setAttributesToGet(java.util.Collection<java.lang.String> attributesToGet)
A JSON array of user attribute names, for example
given_name
, that you want Amazon Cognito to include in the response for each user. |
void |
setFilter(java.lang.String filter)
A filter string of the form
"AttributeName Filter-Type "AttributeValue"".
|
void |
setLimit(java.lang.Integer limit)
Maximum number of users to be returned.
|
void |
setPaginationToken(java.lang.String 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.
|
void |
setUserPoolId(java.lang.String userPoolId)
The user pool ID for the user pool on which the search should be
performed.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ListUsersRequest |
withAttributesToGet(java.util.Collection<java.lang.String> attributesToGet)
A JSON array of user attribute names, for example
given_name
, that you want Amazon Cognito to include in the response for each user. |
ListUsersRequest |
withAttributesToGet(java.lang.String... attributesToGet)
A JSON array of user attribute names, for example
given_name
, that you want Amazon Cognito to include in the response for each user. |
ListUsersRequest |
withFilter(java.lang.String filter)
A filter string of the form
"AttributeName Filter-Type "AttributeValue"".
|
ListUsersRequest |
withLimit(java.lang.Integer limit)
Maximum number of users to be returned.
|
ListUsersRequest |
withPaginationToken(java.lang.String 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.
|
ListUsersRequest |
withUserPoolId(java.lang.String userPoolId)
The user pool ID for the user pool on which the search should be
performed.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic java.lang.String getUserPoolId()
The user pool ID for the user pool on which the search should be performed.
Constraints:
Length: 1 - 55
Pattern: [\w-]+_[0-9a-zA-Z]+
The user pool ID for the user pool on which the search should be performed.
public void setUserPoolId(java.lang.String userPoolId)
The user pool ID for the user pool on which the search should be performed.
Constraints:
Length: 1 - 55
Pattern: [\w-]+_[0-9a-zA-Z]+
userPoolId - The user pool ID for the user pool on which the search should be performed.
public ListUsersRequest withUserPoolId(java.lang.String userPoolId)
The user pool ID for the user pool on which the search should be performed.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 55
Pattern: [\w-]+_[0-9a-zA-Z]+
userPoolId - The user pool ID for the user pool on which the search should be performed.
public java.util.List<java.lang.String> getAttributesToGet()
A JSON array of user attribute names, for example given_name
, that you want Amazon Cognito to include in the response for each user.
When you don't provide an AttributesToGet parameter, Amazon
Cognito returns all attributes for each user.
A JSON array of user attribute names, for example
given_name, that you want Amazon Cognito to include
in the response for each user. When you don't provide an
AttributesToGet parameter, Amazon Cognito returns
all attributes for each user.
public void setAttributesToGet(java.util.Collection<java.lang.String> attributesToGet)
A JSON array of user attribute names, for example given_name
, that you want Amazon Cognito to include in the response for each user.
When you don't provide an AttributesToGet parameter, Amazon
Cognito returns all attributes for each user.
attributesToGet -
A JSON array of user attribute names, for example
given_name, that you want Amazon Cognito to
include in the response for each user. When you don't provide
an AttributesToGet parameter, Amazon Cognito
returns all attributes for each user.
public ListUsersRequest withAttributesToGet(java.lang.String... attributesToGet)
A JSON array of user attribute names, for example given_name
, that you want Amazon Cognito to include in the response for each user.
When you don't provide an AttributesToGet parameter, Amazon
Cognito returns all attributes for each user.
Returns a reference to this object so that method calls can be chained together.
attributesToGet -
A JSON array of user attribute names, for example
given_name, that you want Amazon Cognito to
include in the response for each user. When you don't provide
an AttributesToGet parameter, Amazon Cognito
returns all attributes for each user.
public ListUsersRequest withAttributesToGet(java.util.Collection<java.lang.String> attributesToGet)
A JSON array of user attribute names, for example given_name
, that you want Amazon Cognito to include in the response for each user.
When you don't provide an AttributesToGet parameter, Amazon
Cognito returns all attributes for each user.
Returns a reference to this object so that method calls can be chained together.
attributesToGet -
A JSON array of user attribute names, for example
given_name, that you want Amazon Cognito to
include in the response for each user. When you don't provide
an AttributesToGet parameter, Amazon Cognito
returns all attributes for each user.
public java.lang.Integer getLimit()
Maximum number of users to be returned.
Constraints:
Range: 0 - 60
Maximum number of users to be returned.
public void setLimit(java.lang.Integer limit)
Maximum number of users to be returned.
Constraints:
Range: 0 - 60
limit - Maximum number of users to be returned.
public ListUsersRequest withLimit(java.lang.Integer limit)
Maximum number of users to be returned.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 0 - 60
limit - Maximum number of users to be returned.
public java.lang.String getPaginationToken()
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.
Constraints:
Length: 1 -
Pattern: [\S]+
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.
public void setPaginationToken(java.lang.String 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.
Constraints:
Length: 1 -
Pattern: [\S]+
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.
public ListUsersRequest withPaginationToken(java.lang.String 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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
Pattern: [\S]+
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.
public java.lang.String getFilter()
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.
Constraints:
Length: - 256
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.
public void setFilter(java.lang.String 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.
Constraints:
Length: - 256
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.
public ListUsersRequest withFilter(java.lang.String 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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: - 256
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.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object