Struct aws_sdk_cognitoidentityprovider::operation::list_users::builders::ListUsersFluentBuilder
source · pub struct ListUsersFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to ListUsers
.
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
Implementations§
source§impl ListUsersFluentBuilder
impl ListUsersFluentBuilder
sourcepub fn as_input(&self) -> &ListUsersInputBuilder
pub fn as_input(&self) -> &ListUsersInputBuilder
Access the ListUsers as a reference.
sourcepub async fn send(
self,
) -> Result<ListUsersOutput, SdkError<ListUsersError, HttpResponse>>
pub async fn send( self, ) -> Result<ListUsersOutput, SdkError<ListUsersError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self,
) -> CustomizableOperation<ListUsersOutput, ListUsersError, Self>
pub fn customize( self, ) -> CustomizableOperation<ListUsersOutput, ListUsersError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn into_paginator(self) -> ListUsersPaginator
pub fn into_paginator(self) -> ListUsersPaginator
Create a paginator for this request
Paginators are used by calling send().await
which returns a PaginationStream
.
sourcepub fn user_pool_id(self, input: impl Into<String>) -> Self
pub fn user_pool_id(self, input: impl Into<String>) -> Self
The user pool ID for the user pool on which the search should be performed.
sourcepub fn set_user_pool_id(self, input: Option<String>) -> Self
pub fn set_user_pool_id(self, input: Option<String>) -> Self
The user pool ID for the user pool on which the search should be performed.
sourcepub fn get_user_pool_id(&self) -> &Option<String>
pub fn get_user_pool_id(&self) -> &Option<String>
The user pool ID for the user pool on which the search should be performed.
sourcepub fn attributes_to_get(self, input: impl Into<String>) -> Self
pub fn attributes_to_get(self, input: impl Into<String>) -> Self
Appends an item to AttributesToGet
.
To override the contents of this collection use set_attributes_to_get
.
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.
Use AttributesToGet
with required attributes in your user pool, or in conjunction with Filter
. Amazon Cognito returns an error if not all users in the results have set a value for the attribute you request. Attributes that you can't filter on, including custom attributes, must have a value set in every user profile before an AttributesToGet
parameter returns results.
sourcepub fn set_attributes_to_get(self, input: Option<Vec<String>>) -> Self
pub fn set_attributes_to_get(self, input: Option<Vec<String>>) -> Self
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.
Use AttributesToGet
with required attributes in your user pool, or in conjunction with Filter
. Amazon Cognito returns an error if not all users in the results have set a value for the attribute you request. Attributes that you can't filter on, including custom attributes, must have a value set in every user profile before an AttributesToGet
parameter returns results.
sourcepub fn get_attributes_to_get(&self) -> &Option<Vec<String>>
pub fn get_attributes_to_get(&self) -> &Option<Vec<String>>
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.
Use AttributesToGet
with required attributes in your user pool, or in conjunction with Filter
. Amazon Cognito returns an error if not all users in the results have set a value for the attribute you request. Attributes that you can't filter on, including custom attributes, must have a value set in every user profile before an AttributesToGet
parameter returns results.
sourcepub fn pagination_token(self, input: impl Into<String>) -> Self
pub fn pagination_token(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_pagination_token(self, input: Option<String>) -> Self
pub fn set_pagination_token(self, input: Option<String>) -> Self
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.
sourcepub fn get_pagination_token(&self) -> &Option<String>
pub fn get_pagination_token(&self) -> &Option<String>
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.
sourcepub fn filter(self, input: impl Into<String>) -> Self
pub fn filter(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_filter(self, input: Option<String>) -> Self
pub fn set_filter(self, input: Option<String>) -> Self
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.
sourcepub fn get_filter(&self) -> &Option<String>
pub fn get_filter(&self) -> &Option<String>
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.
Trait Implementations§
source§impl Clone for ListUsersFluentBuilder
impl Clone for ListUsersFluentBuilder
source§fn clone(&self) -> ListUsersFluentBuilder
fn clone(&self) -> ListUsersFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for ListUsersFluentBuilder
impl !RefUnwindSafe for ListUsersFluentBuilder
impl Send for ListUsersFluentBuilder
impl Sync for ListUsersFluentBuilder
impl Unpin for ListUsersFluentBuilder
impl !UnwindSafe for ListUsersFluentBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more